[fix](group commit) abort txn should use label if replay wal failed (#30219)

This commit is contained in:
meiyi
2024-01-22 20:33:00 +08:00
committed by yiguolei
parent 9e0c518aaf
commit 9c742d46a2
6 changed files with 44 additions and 35 deletions

View File

@ -191,14 +191,14 @@ Status GroupCommitTable::get_first_block_load_queue(
std::unique_lock l(_lock);
for (int i = 0; i < 3; i++) {
bool is_schema_version_match = true;
for (auto it = _load_block_queues.begin(); it != _load_block_queues.end(); ++it) {
if (!it->second->need_commit()) {
if (base_schema_version == it->second->schema_version) {
if (it->second->add_load_id(load_id).ok()) {
load_block_queue = it->second;
for (const auto& [_, inner_block_queue] : _load_block_queues) {
if (!inner_block_queue->need_commit()) {
if (base_schema_version == inner_block_queue->schema_version) {
if (inner_block_queue->add_load_id(load_id).ok()) {
load_block_queue = inner_block_queue;
return Status::OK();
}
} else if (base_schema_version < it->second->schema_version) {
} else if (base_schema_version < inner_block_queue->schema_version) {
is_schema_version_match = false;
}
}