Skip to content

Commit

Permalink
Fix unit test.
Browse files Browse the repository at this point in the history
  • Loading branch information
small-turtle-1 committed Dec 19, 2024
1 parent 215cc69 commit 63a87db
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/storage/meta/entry/block_entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,15 @@ void BlockEntry::CommitBlock(TransactionID txn_id, TxnTimeStamp commit_ts) {
}
this->using_txn_id_ = 0;

if (min_row_ts_ == 0 || min_row_ts_ > max_row_ts_) {
if (min_row_ts_ > max_row_ts_) {
UnrecoverableError(fmt::format("BlockEntry::CommitBlock invalid ts, min_row_ts_: {}, max_row_ts_: {}", min_row_ts_, max_row_ts_));
}
if (min_row_ts_ == 0) {
min_row_ts_ = commit_ts;
}
if (max_row_ts_ == 0) {
max_row_ts_ = commit_ts;
}

if (!this->Committed()) {
this->Commit(commit_ts);
Expand Down

0 comments on commit 63a87db

Please sign in to comment.