caiconghui commented on a change in pull request #3051: Support sharding
tablet_map_lock into more small map locks to make good performance for tablet
manage task
URL: https://github.com/apache/incubator-doris/pull/3051#discussion_r389253303
##########
File path: be/src/olap/tablet_manager.cpp
##########
@@ -533,11 +551,12 @@ OLAPStatus TabletManager::_drop_tablet_unlocked(
OLAPStatus TabletManager::drop_tablets_on_error_root_path(
const vector<TabletInfo>& tablet_info_vec) {
OLAPStatus res = OLAP_SUCCESS;
- WriteLock wlock(&_tablet_map_lock);
for (const TabletInfo& tablet_info : tablet_info_vec) {
TTabletId tablet_id = tablet_info.tablet_id;
TSchemaHash schema_hash = tablet_info.schema_hash;
+ RWMutex& tablet_map_lock = _get_tablet_map_lock(tablet_id);
+ WriteLock wlock(&tablet_map_lock);
Review comment:
ok, I will refactor the code
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]