[feature-wip](unique-key-merge-on-write) opt lock and only save valid delete_bitmap (#11953)

1. use rlock in most logic instead of wrlock
2. filter stale rowset's delete bitmap in save meta
3. add a delete_bitmap lock to handle compaction and publish_txn confict

Co-authored-by: yixiutt <yixiu@selectdb.com>
This commit is contained in:
yixiutt
2022-08-23 14:43:40 +08:00
committed by GitHub
parent 30a13c8141
commit 60fddd56e7
10 changed files with 73 additions and 51 deletions

View File

@ -126,11 +126,11 @@ Status EnginePublishVersionTask::finish() {
max_version = tablet->max_version();
}
if (version.first != max_version.second + 1) {
LOG(INFO) << "uniq key with merge-on-write version not continuous, current "
"max "
"version="
<< max_version.second << ", publish_version=" << version.first
<< " tablet_id=" << tablet->tablet_id();
VLOG_NOTICE << "uniq key with merge-on-write version not continuous, current "
"max "
"version="
<< max_version.second << ", publish_version=" << version.first
<< " tablet_id=" << tablet->tablet_id();
meet_version_not_continuous = true;
res = Status::OLAPInternalError(OLAP_ERR_PUBLISH_VERSION_NOT_CONTINUOUS);
continue;
@ -180,7 +180,7 @@ Status EnginePublishVersionTask::finish() {
LOG(INFO) << "finish to publish version on transaction."
<< "transaction_id=" << transaction_id
<< ", error_tablet_size=" << _error_tablet_ids->size();
<< ", error_tablet_size=" << _error_tablet_ids->size() << ", res=" << res.to_string();
return res;
}