Skip to content

Commit c6b6446

Browse files
committed
refine comments
1 parent fe1be93 commit c6b6446

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/query/service/src/sessions/query_ctx.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,9 +1601,11 @@ impl TableContext for QueryContext {
16011601
let existing_timestamp = txn_mgr.get_table_txn_begin_timestamp(table_id);
16021602

16031603
if let Some(existing_ts) = existing_timestamp {
1604-
// If we already have a transaction timestamp for this table,
1604+
// Defensively check that:
1605+
// Inside an active transaction, if we already have a transaction timestamp for this table,
16051606
// ensure the new segment_block_timestamp is greater than or equal to it.
1606-
// This maintains timestamp monotonicity within the transaction.
1607+
// This maintains timestamp monotonicity within the transaction, which is crucial for
1608+
// the safety of vacuum operation.
16071609
if table_meta_timestamps.segment_block_timestamp < existing_ts {
16081610
return Err(ErrorCode::Internal(format!(
16091611
"[QUERY-CTX] Transaction timestamp violation: table_id = {}, new segment timestamp {:?} is lesser than existing transaction timestamp {:?}",

0 commit comments

Comments
 (0)