Skip to content

Commit 5a7f5ff

Browse files
committed
add commented out validation implementation
1 parent b18c329 commit 5a7f5ff

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/persist-client/src/batch.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,6 +1294,19 @@ pub(crate) fn validate_truncate_batch<T: Timestamp>(
12941294
}
12951295
}
12961296

1297+
// NB(ptravers): see `compare_and_append_batch`.
1298+
//let batch = &batch.desc;
1299+
//if !PartialOrder::less_equal(batch.lower(), truncate.lower())
1300+
// || PartialOrder::less_than(batch.upper(), truncate.upper())
1301+
//{
1302+
// return Err(InvalidUsage::InvalidBatchBounds {
1303+
// batch_lower: batch.lower().clone(),
1304+
// batch_upper: batch.upper().clone(),
1305+
// append_lower: truncate.lower().clone(),
1306+
// append_upper: truncate.upper().clone(),
1307+
// });
1308+
//}
1309+
12971310
Ok(())
12981311
}
12991312

0 commit comments

Comments
 (0)