imay commented on a change in pull request #3260: [Storage] open data dirs 
parallelly
URL: https://github.com/apache/incubator-doris/pull/3260#discussion_r404604869
 
 

 ##########
 File path: be/src/olap/storage_engine.cpp
 ##########
 @@ -185,6 +177,39 @@ OLAPStatus StorageEngine::_open() {
     return OLAP_SUCCESS;
 }
 
+OLAPStatus StorageEngine::_init_store_map() {
+    std::vector < std::pair<DataDir*> tmp_stores;
+    std::vector<std::thread> threads;
+    std::atomic<bool> init_error{false};
+    for (auto& path : _options.store_paths) {
+        DataDir* store = new DataDir(path.path, path.capacity_bytes, 
path.storage_medium,
+                                     _tablet_manager.get(), 
_txn_manager.get());
+        tmp_stores.emplace_back(store);
+        threads.emplace_back([store, &init_error]() {
+            auto st = store->init();
+            if (!st.ok()) {
+                init_error = true;
+                LOG(WARNING) << "Store load failed, path=" << store->path();
 
 Review comment:
   should print st.to_string() too.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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