vagetablechicken commented on issue #3207: StorageEngine: unused_rowsets use unordered_multimap URL: https://github.com/apache/incubator-doris/pull/3207#issuecomment-604404054 It couldn't be better. I'll fix it. -------- 原始信息 -------- 发件人: lichaoyong <notificati...@github.com> 日期: 2020/3/26 19:42 (GMT+08:00) 收件人: apache/incubator-doris <incubator-do...@noreply.github.com> 抄送: Wei5 Huang 黄威 <huangw...@xiaomi.com>, Author <aut...@noreply.github.com> 主题: [External Mail][营销邮件] Re: [apache/incubator-doris] StorageEngine: unused_rowsets use unordered_multimap (#3207) @chaoyli requested changes on this pull request. ________________________________ In be/src/olap/storage_engine.h<https://github.com/apache/incubator-doris/pull/3207#discussion_r398507447>: > @@ -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; 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(). — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub<https://github.com/apache/incubator-doris/pull/3207#pullrequestreview-381927829>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AF4NY2E5WJREZF7FNOKJR73RJM5TBANCNFSM4LUBIGLQ>. #/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#
---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org