diff --git a/src/storage/meta/entry/segment_index_entry.cpp b/src/storage/meta/entry/segment_index_entry.cpp index 033506f829..cbc75adc5b 100644 --- a/src/storage/meta/entry/segment_index_entry.cpp +++ b/src/storage/meta/entry/segment_index_entry.cpp @@ -1155,8 +1155,8 @@ ChunkIndexEntry *SegmentIndexEntry::GetChunkIndexEntry(ChunkID chunk_id) { } nlohmann::json SegmentIndexEntry::Serialize(TxnTimeStamp max_commit_ts) { - if (this->deleted_) { - String error_message = "Segment Column index entry can't be deleted."; + if (CheckDeprecate(max_commit_ts)) { + String error_message = fmt::format("Segment Column index entry deprecate_ts: {}, commit_ts: {}.", deprecate_ts_.load(), max_commit_ts); UnrecoverableError(error_message); } diff --git a/src/storage/meta/entry/table_index_entry.cpp b/src/storage/meta/entry/table_index_entry.cpp index 9a58ba030b..2a78954429 100644 --- a/src/storage/meta/entry/table_index_entry.cpp +++ b/src/storage/meta/entry/table_index_entry.cpp @@ -248,7 +248,7 @@ nlohmann::json TableIndexEntry::Serialize(TxnTimeStamp max_commit_ts) { std::shared_lock r_lock(rw_locker_); for (const auto &[segment_id, index_entry] : this->index_by_segment_) { - if (index_entry->commit_ts_ <= max_commit_ts && !index_entry->deleted_) { + if (!index_entry->CheckDeprecate(max_commit_ts)) { segment_index_entry_candidates.push_back(index_entry); } }