mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-18 05:50:41 +00:00
feat: enable batch checker
This commit is contained in:
@@ -572,7 +572,7 @@ impl Batch {
|
||||
}
|
||||
|
||||
/// A struct to check the batch is monotonic.
|
||||
#[cfg(debug_assertions)]
|
||||
// #[cfg(debug_assertions)]
|
||||
#[derive(Default)]
|
||||
pub(crate) struct BatchChecker {
|
||||
last_batch: Option<Batch>,
|
||||
@@ -580,7 +580,7 @@ pub(crate) struct BatchChecker {
|
||||
end: Option<Timestamp>,
|
||||
}
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
// #[cfg(debug_assertions)]
|
||||
impl BatchChecker {
|
||||
/// Attaches the given start timestamp to the checker.
|
||||
pub(crate) fn with_start(mut self, start: Option<Timestamp>) -> Self {
|
||||
|
||||
@@ -145,7 +145,7 @@ impl UnorderedScan {
|
||||
partition,
|
||||
part_range,
|
||||
);
|
||||
#[cfg(debug_assertions)]
|
||||
// #[cfg(debug_assertions)]
|
||||
let mut checker = crate::read::BatchChecker::default()
|
||||
.with_start(Some(part_range.start))
|
||||
.with_end(Some(part_range.end));
|
||||
@@ -168,7 +168,7 @@ impl UnorderedScan {
|
||||
continue;
|
||||
}
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
// #[cfg(debug_assertions)]
|
||||
checker.ensure_part_range_batch(
|
||||
"UnorderedScan",
|
||||
stream_ctx.input.mapper.metadata().region_id,
|
||||
|
||||
Reference in New Issue
Block a user