File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/query/service/src/sessions Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff 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 {:?}" ,
You can’t perform that action at this time.
0 commit comments