[BugFix] fix dcheck failure when compaction publish (#63562)

Signed-off-by: luohaha <18810541851@163.com>
This commit is contained in:
Yixin Luo 2025-09-26 15:44:47 +08:00 committed by GitHub
parent a9b40b9378
commit da99a8093e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -1198,7 +1198,8 @@ Status UpdateManager::light_publish_primary_compaction(const TxnLogPB_OpCompacti
RETURN_IF_ERROR(resolver->execute());
}
// 3. ingest ssts to index
DCHECK(delvecs.size() == op_compaction.ssts_size());
DCHECK(op_compaction.ssts_size() == 0 || delvecs.size() == op_compaction.ssts_size())
<< "delvecs.size(): " << delvecs.size() << ", op_compaction.ssts_size(): " << op_compaction.ssts_size();
for (int i = 0; i < op_compaction.ssts_size(); i++) {
// metadata.next_rowset_id() + i is the rssid of output rowset's i-th segment
RETURN_IF_ERROR(index.ingest_sst(op_compaction.ssts(i), metadata.next_rowset_id() + i, metadata.version(),