yangzhg commented on a change in pull request #8759:
URL: https://github.com/apache/incubator-doris/pull/8759#discussion_r841040326
##########
File path: be/src/olap/schema_change.cpp
##########
@@ -1636,7 +1636,7 @@ OLAPStatus
SchemaChangeHandler::_do_process_alter_tablet_v2(const TAlterTabletRe
break;
}
// set state to ready
- WriteLock new_wlock(new_tablet->get_header_lock());
+ std::lock_guard<std::shared_mutex>
new_wlock(new_tablet->get_header_lock());
Review comment:
std::lock_guard will be locked only once on construction and unlocked on
destruction. but unique_lock has lock and unlock method, it is more flexible,
condition_variable needs a unique_lock
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]