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/03/26 11:42:27 UTC

[GitHub] [incubator-doris] chaoyli commented on a change in pull request #3207: StorageEngine: unused_rowsets use unordered_multimap

chaoyli commented on a change in pull request #3207: StorageEngine: unused_rowsets use unordered_multimap
URL: https://github.com/apache/incubator-doris/pull/3207#discussion_r398507447
 
 

 ##########
 File path: be/src/olap/storage_engine.h
 ##########
 @@ -296,7 +296,9 @@ class StorageEngine {
     static StorageEngine* _s_instance;
 
     Mutex _gc_mutex;
-    std::unordered_map<std::string, RowsetSharedPtr> _unused_rowsets;
+    // map<rowset_id(str), pair<rowset_path(str),RowsetSharedPtr>>
+    // if we use RowsetId as the key, we need custom hash func
+    std::unordered_multimap<std::string, std::pair<std::string,RowsetSharedPtr>> _unused_rowsets;
 
 Review comment:
   Previous, rowset_id is not unique. 
   Nowadays, rowset_id is unique. So you can use std::unordered_map<std::string, RowsetSharedPtr> _unused_rowsets instead, not use unique_id().

----------------------------------------------------------------
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


With regards,
Apache Git Services

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