You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by kx...@apache.org on 2023/08/18 10:32:02 UTC
[doris] 12/13: [fix](merge-on-write) should use write lock of tablet's header lock in #23047 (#23161)
This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
commit 68a02ba72fe51e05e5e8357204ac45b3faea4042
Author: zhannngchen <48...@users.noreply.github.com>
AuthorDate: Fri Aug 18 17:50:44 2023 +0800
[fix](merge-on-write) should use write lock of tablet's header lock in #23047 (#23161)
---
be/src/olap/task/index_builder.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/be/src/olap/task/index_builder.cpp b/be/src/olap/task/index_builder.cpp
index 0f9c51a4ba..90aeedd931 100644
--- a/be/src/olap/task/index_builder.cpp
+++ b/be/src/olap/task/index_builder.cpp
@@ -449,8 +449,8 @@ Status IndexBuilder::modify_rowsets(const Merger::Statistics* stats) {
if (_tablet->keys_type() == KeysType::UNIQUE_KEYS &&
_tablet->enable_unique_key_merge_on_write()) {
- std::lock_guard<std::mutex> wlock(_tablet->get_rowset_update_lock());
- std::shared_lock<std::shared_mutex> rlock(_tablet->get_header_lock());
+ std::lock_guard<std::mutex> rowset_update_wlock(_tablet->get_rowset_update_lock());
+ std::lock_guard<std::shared_mutex> meta_wlock(_tablet->get_header_lock());
DeleteBitmapPtr delete_bitmap = std::make_shared<DeleteBitmap>(_tablet->tablet_id());
for (auto i = 0; i < _input_rowsets.size(); ++i) {
RowsetId input_rowset_id = _input_rowsets[i]->rowset_id();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org