Skip to content

Commit 94cf296

Browse files
rock-gityuhaijun999
authored andcommitted
[fix][store] Fixup region merge issues.
1 parent 4c9b334 commit 94cf296

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/handler/raft_apply_handler.cc

+8-8
Original file line numberDiff line numberDiff line change
@@ -774,8 +774,7 @@ int PrepareMergeHandler::Handle(std::shared_ptr<Context>, store::RegionPtr sourc
774774
target_region = store_region_meta->GetRegion(request.target_region_id());
775775

776776
} else if (comparison > 0) {
777-
// Todo
778-
DINGO_LOG(FATAL) << fmt::format(
777+
DINGO_LOG(WARNING) << fmt::format(
779778
"[merge.merging][job_id({}).region({}/{})] epoch not match, source_region({}/{}) "
780779
"target_region({}/{}/{}) ",
781780
request.job_id(), source_region->Id(), target_region->Id(), source_region->EpochToString(),
@@ -1449,14 +1448,14 @@ int VectorBatchAddHandler::Handle(std::shared_ptr<Context> ctx, store::RegionPtr
14491448
ctx->SetStatus(status);
14501449
}
14511450
DINGO_LOG(WARNING) << fmt::format("[raft.apply][region({})] delete vector failed, count: {}, error: {}",
1452-
vector_index_id, request.delete_vector_ids().size(), Helper::PrintStatus(status));
1451+
vector_index_id, request.delete_vector_ids().size(),
1452+
Helper::PrintStatus(status));
14531453
}
14541454
}
14551455
} catch (const std::exception &e) {
14561456
DINGO_LOG(FATAL) << fmt::format("[raft.apply][region({})] delete vector exception, error: {}", vector_index_id,
14571457
e.what());
14581458
}
1459-
14601459
}
14611460
}
14621461

@@ -1741,13 +1740,14 @@ int DocumentBatchAddHandler::Handle(std::shared_ptr<Context> ctx, store::RegionP
17411740
document_index_id, e.what());
17421741
}
17431742

1744-
//delete document
1743+
// delete document
17451744
try {
17461745
auto start_time = Helper::TimestampNs();
17471746
auto status = document_index_wrapper->Delete(Helper::PbRepeatedToVector(request.delete_document_ids()));
17481747
if (tracker) tracker->SetDocumentIndexWriteTime(Helper::TimestampNs() - start_time);
17491748
DINGO_LOG(DEBUG) << fmt::format("[raft.apply][region({})] delete document, count: {} cost: {}ns",
1750-
document_index_id, request.delete_document_ids().size(), Helper::TimestampNs() - start_time);
1749+
document_index_id, request.delete_document_ids().size(),
1750+
Helper::TimestampNs() - start_time);
17511751
if (status.ok()) {
17521752
if (region->GetStoreEngineType() == pb::common::STORE_ENG_RAFT_STORE && log_id != INT64_MAX) {
17531753
document_index_wrapper->SetApplyLogId(log_id);
@@ -1757,13 +1757,13 @@ int DocumentBatchAddHandler::Handle(std::shared_ptr<Context> ctx, store::RegionP
17571757
ctx->SetStatus(status);
17581758
}
17591759
DINGO_LOG(WARNING) << fmt::format("[raft.apply][region({})] delete document failed, count: {}, error: {}",
1760-
document_index_id, request.delete_document_ids().size(), Helper::PrintStatus(status));
1760+
document_index_id, request.delete_document_ids().size(),
1761+
Helper::PrintStatus(status));
17611762
}
17621763
} catch (const std::exception &e) {
17631764
DINGO_LOG(FATAL) << fmt::format("[raft.apply][region({})] delete document exception, error: {}",
17641765
document_index_id, e.what());
17651766
}
1766-
17671767
}
17681768
}
17691769

0 commit comments

Comments
 (0)