Fix BE do_tablet_meta_checkpoint retain _meta_lock for a long time (#2430)

Add a flag in RowsetMeta to record whether it has been deleted from rowset meta.
Before this PR, 37156 rowsets only cost 1642 s.
With this PR, 37319 rowsets just cost 1 s.
This commit is contained in:
Lijia Liu
2019-12-12 23:21:43 +08:00
committed by ZHAO Chun
parent 59f5851c29
commit 4d958ec7a1
3 changed files with 21 additions and 2 deletions

View File

@ -1036,7 +1036,7 @@ void* StorageEngine::_tablet_checkpoint_callback(void* arg) {
#endif
LOG(INFO) << "try to start tablet meta checkpoint thread!";
while (true) {
LOG(INFO) << "begin to do tablet meta checkpoint";
LOG(INFO) << "begin to do tablet meta checkpoint:" << ((DataDir*)arg)->path();
int64_t start_time = UnixMillis();
_tablet_manager->do_tablet_meta_checkpoint((DataDir*)arg);
int64_t used_time = (UnixMillis() - start_time) / 1000;