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 2022/07/19 07:23:59 UTC

[GitHub] [doris] zhannngchen commented on a diff in pull request #11001: [enhancement](be) remove useless lock usage

zhannngchen commented on code in PR #11001:
URL: https://github.com/apache/doris/pull/11001#discussion_r924149389


##########
be/src/olap/tablet_meta.cpp:
##########
@@ -636,7 +636,6 @@ void TabletMeta::modify_rs_metas(const std::vector<RowsetMetaSharedPtr>& to_add,
 // an existing tablet before. Add after revise, only the passing "rs_metas"
 // is needed.
 void TabletMeta::revise_rs_metas(std::vector<RowsetMetaSharedPtr>&& rs_metas) {
-    std::lock_guard<std::shared_mutex> wrlock(_meta_lock);

Review Comment:
   Acquiring a write lock on TabletMeta's `_meta_lock` here is meaningless, since `_rs_metas` and `_stale_rs_metas` is protected by the `_meta_lock` of Tablet.
   Using of this lock is confusing here, so we'd better to remove it.
   @yiguolei @morningman could you help to check it again?



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

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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