chaoyli closed pull request #503: Make SnapshotManager compiled successfully
URL: https://github.com/apache/incubator-doris/pull/503
 
 
   

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/CMakeLists.txt b/be/src/olap/CMakeLists.txt
index 3519e16a..7522aee0 100644
--- a/be/src/olap/CMakeLists.txt
+++ b/be/src/olap/CMakeLists.txt
@@ -59,7 +59,7 @@ add_library(Olap STATIC
     serialize.cpp
     storage_engine.cpp
     data_dir.cpp
-    #snapshot_manager.cpp
+    snapshot_manager.cpp
     stream_index_common.cpp
     stream_index_reader.cpp
     stream_index_writer.cpp
diff --git a/be/src/olap/snapshot_manager.cpp b/be/src/olap/snapshot_manager.cpp
index 5eb23759..b815fc36 100644
--- a/be/src/olap/snapshot_manager.cpp
+++ b/be/src/olap/snapshot_manager.cpp
@@ -657,7 +657,7 @@ OLAPStatus SnapshotManager::storage_medium_migrate(
     }
 
     // judge case when no need to migrate
-    uint32_t count = available_storage_medium_type_count();
+    uint32_t count = 
StorageEngine::get_instance()->available_storage_medium_type_count();
     if (count <= 1) {
         LOG(INFO) << "available storage medium type count is less than 1, "
                   << "no need to migrate. count=" << count;
@@ -700,7 +700,7 @@ OLAPStatus SnapshotManager::storage_medium_migrate(
         tablet->release_header_lock();
 
         // generate schema hash path where files will be migrated
-        auto stores = get_stores_for_create_tablet(storage_medium);
+        auto stores = 
StorageEngine::get_instance()->get_stores_for_create_tablet(storage_medium);
         if (stores.empty()) {
             res = OLAP_ERR_INVALID_ROOT_PATH;
             OLAP_LOG_WARNING("fail to get root path for create tablet.");
@@ -750,7 +750,7 @@ OLAPStatus SnapshotManager::storage_medium_migrate(
             res = OLAP_ERR_TABLE_CREATE_FROM_HEADER_ERROR;
             break;
         }
-        res = _tablet_mgr.add_tablet(tablet_id, schema_hash, tablet, false);
+        res = TabletManager::instance()->add_tablet(tablet_id, schema_hash, 
tablet, false);
         if (res != OLAP_SUCCESS) {
             OLAP_LOG_WARNING("fail to add tablet to StorageEngine. [res=%d]", 
res);
             break;
diff --git a/be/src/olap/tablet.h b/be/src/olap/tablet.h
index 5ae78f9c..b4046131 100644
--- a/be/src/olap/tablet.h
+++ b/be/src/olap/tablet.h
@@ -314,7 +314,6 @@ class Tablet : public std::enable_shared_from_this<Tablet> {
     OLAPStatus _unprotect_clear_schema_change_info(AlterTabletType* 
alter_tablet_type,
                                                 bool only_one,
                                                 bool check_only);
-public:
     DataDir* _data_dir;
     TabletState _state;
     RowsetGraph* _rs_graph;


 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to