This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
commit 1da1fac4ee1a8d29c46e393b7e980f40becc8a78 Author: Kaijie Chen <[email protected]> AuthorDate: Wed Apr 10 22:04:49 2024 +0800 [improve](load) try lock 30ms to get base_migration_lock in rowset builder (#32243) --- be/src/olap/rowset_builder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/be/src/olap/rowset_builder.cpp b/be/src/olap/rowset_builder.cpp index e381d9ff9b7..fb9c5421955 100644 --- a/be/src/olap/rowset_builder.cpp +++ b/be/src/olap/rowset_builder.cpp @@ -161,8 +161,8 @@ Status RowsetBuilder::check_tablet_version_count() { } Status RowsetBuilder::prepare_txn() { - std::shared_lock base_migration_lock(tablet()->get_migration_lock(), std::try_to_lock); - if (!base_migration_lock.owns_lock()) { + std::shared_lock base_migration_lock(tablet()->get_migration_lock(), std::defer_lock); + if (!base_migration_lock.try_lock_for(std::chrono::milliseconds(30))) { return Status::Error<TRY_LOCK_FAILED>("try migration lock failed"); } std::lock_guard<std::mutex> push_lock(tablet()->get_push_lock()); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
