This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new 1004c41fd94 [improve](load) try lock 30ms to get base_migration_lock
in delta writer (#32243) (#37576)
1004c41fd94 is described below
commit 1004c41fd94c37f15adb579aac2580e69ed3aa5f
Author: Kaijie Chen <[email protected]>
AuthorDate: Wed Jul 10 14:05:47 2024 +0800
[improve](load) try lock 30ms to get base_migration_lock in delta writer
(#32243) (#37576)
cherry-pick #32243
---
be/src/olap/delta_writer.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/be/src/olap/delta_writer.cpp b/be/src/olap/delta_writer.cpp
index ec699205aed..937b6214525 100644
--- a/be/src/olap/delta_writer.cpp
+++ b/be/src/olap/delta_writer.cpp
@@ -189,9 +189,9 @@ Status DeltaWriter::init() {
}
{
- std::shared_lock base_migration_rlock(_tablet->get_migration_lock(),
std::try_to_lock);
- if (!base_migration_rlock.owns_lock()) {
- return Status::Error<TRY_LOCK_FAILED>("get lock failed");
+ std::shared_lock base_migration_rlock(_tablet->get_migration_lock(),
std::defer_lock);
+ if (!base_migration_rlock.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());
RETURN_IF_ERROR(_storage_engine->txn_manager()->prepare_txn(_req.partition_id,
_tablet,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]