chaoyli closed pull request #530: Change StorageMigrationTask to be adapted to 
Rowset interface
URL: https://github.com/apache/incubator-doris/pull/530
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/be/src/olap/task/engine_batch_load_task.h 
b/be/src/olap/task/engine_batch_load_task.h
index 610369f8..6a31fc2c 100644
--- a/be/src/olap/task/engine_batch_load_task.h
+++ b/be/src/olap/task/engine_batch_load_task.h
@@ -77,9 +77,9 @@ class EngineBatchLoadTask : public EngineTask{
     std::vector<TTabletInfo>* _tablet_infos;
     FileDownloader::FileDownloaderParam _downloader_param;
     FileDownloader* _file_downloader;
+    int64_t _signature;
     AgentStatus _download_status;
     AgentStatus* _res_status;
-    int64_t _signature;
 };  // class Pusher
 }  // namespace doris
 #endif  // DORIS_BE_SRC_OLAP_TASK_ENGINE_BATCH_LOAD_TASK_H
diff --git a/be/src/olap/task/engine_storage_migration_task.cpp 
b/be/src/olap/task/engine_storage_migration_task.cpp
index d387e39d..2585f614 100644
--- a/be/src/olap/task/engine_storage_migration_task.cpp
+++ b/be/src/olap/task/engine_storage_migration_task.cpp
@@ -69,7 +69,7 @@ OLAPStatus 
EngineStorageMigrationTask::_storage_medium_migrate(
         return OLAP_SUCCESS;
     }
 
-    vector<ColumnData*> olap_data_sources;
+    vector<RowsetReaderSharedPtr> rs_readers;
     tablet->obtain_push_lock();
 
     do {
@@ -84,8 +84,8 @@ OLAPStatus 
EngineStorageMigrationTask::_storage_medium_migrate(
         }
 
         int32_t end_version = lastest_version->end_version();
-        tablet->acquire_data_sources(Version(0, end_version), 
&olap_data_sources);
-        if (olap_data_sources.size() == 0) {
+        tablet->capture_rs_readers(Version(0, end_version), &rs_readers);
+        if (rs_readers.empty()) {
             tablet->release_header_lock();
             res = OLAP_ERR_VERSION_NOT_EXIST;
             OLAP_LOG_WARNING("fail to acquire data souces. [tablet='%s' 
version=%d]",
@@ -175,7 +175,7 @@ OLAPStatus 
EngineStorageMigrationTask::_storage_medium_migrate(
     } while (0);
 
     tablet->release_push_lock();
-    tablet->release_data_sources(&olap_data_sources);
+    tablet->release_rs_readers(&rs_readers);
 
     return res;
 }
@@ -256,4 +256,4 @@ OLAPStatus 
EngineStorageMigrationTask::_copy_index_and_data_files(
     return OLAP_SUCCESS;
 }
 
-} // doris
\ No newline at end of file
+} // doris


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@doris.apache.org
For additional commands, e-mail: dev-h...@doris.apache.org

Reply via email to