You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/06/03 09:49:26 UTC

[GitHub] [incubator-doris] acelyc111 opened a new pull request #3761: [StorageEngine] Make StorageEngine::open return more detailed info

acelyc111 opened a new pull request #3761:
URL: https://github.com/apache/incubator-doris/pull/3761


   StorageEngine::open just return a very vague status info when failed,
   we have to check logs to find out the root reason, and it's not
   convenient to check logs if we run unit tests in CI dockers.
   It would be better to return more detailed failure info to point out
   the root reason, for example, it may return error status with message
   "file descriptors limit is too small".


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman merged pull request #3761: [StorageEngine] Make StorageEngine::open return more detailed info

Posted by GitBox <gi...@apache.org>.
morningman merged pull request #3761:
URL: https://github.com/apache/incubator-doris/pull/3761


   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] imay commented on a change in pull request #3761: [StorageEngine] Make StorageEngine::open return more detailed info

Posted by GitBox <gi...@apache.org>.
imay commented on a change in pull request #3761:
URL: https://github.com/apache/incubator-doris/pull/3761#discussion_r435333370



##########
File path: be/src/olap/storage_engine.cpp
##########
@@ -170,22 +167,28 @@ OLAPStatus StorageEngine::_open() {
 
     _parse_default_rowset_type();
 
-    return OLAP_SUCCESS;
+    return Status::OK();
 }
 
-OLAPStatus StorageEngine::_init_store_map() {
+Status StorageEngine::_init_store_map() {
     std::vector<DataDir*> tmp_stores;
     std::vector<std::thread> threads;
     std::atomic<bool> init_error{false};
+    SpinLock error_msg_lock;
+    std::string error_msg;
     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]() {
+        threads.emplace_back([&]() {

Review comment:
       better to capture explictly. 




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on a change in pull request #3761: [StorageEngine] Make StorageEngine::open return more detailed info

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #3761:
URL: https://github.com/apache/incubator-doris/pull/3761#discussion_r435128372



##########
File path: be/src/olap/data_dir.cpp
##########
@@ -267,12 +281,13 @@ Status DataDir::_init_meta() {
     _meta = new (std::nothrow) OlapMeta(_path);
     if (_meta == nullptr) {
         LOG(WARNING) << "new olap meta failed";
-        return Status::InternalError("new olap meta failed");
+        return Status::MemoryAllocFailed("new olap meta failed");

Review comment:
       Why not change it to `RETURN_NOT_OK_STATUS_WITH_WARN`?




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] acelyc111 commented on a change in pull request #3761: [StorageEngine] Make StorageEngine::open return more detailed info

Posted by GitBox <gi...@apache.org>.
acelyc111 commented on a change in pull request #3761:
URL: https://github.com/apache/incubator-doris/pull/3761#discussion_r435302914



##########
File path: be/src/olap/data_dir.cpp
##########
@@ -267,12 +281,13 @@ Status DataDir::_init_meta() {
     _meta = new (std::nothrow) OlapMeta(_path);
     if (_meta == nullptr) {
         LOG(WARNING) << "new olap meta failed";
-        return Status::InternalError("new olap meta failed");
+        return Status::MemoryAllocFailed("new olap meta failed");

Review comment:
       Updated.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org