[improve](load) try lock 30ms to get base_migration_lock in rowset builder (#32243)
This commit is contained in:
@ -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());
|
||||
|
||||
Reference in New Issue
Block a user