From e999232def46a3db8ea309350875006ea4aae2a1 Mon Sep 17 00:00:00 2001 From: Liquan Pei Date: Wed, 24 Apr 2024 16:33:43 -0700 Subject: [PATCH] [BUG] InMemoryLog preserve offset orders --- rust/worker/src/execution/operators/pull_log.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rust/worker/src/execution/operators/pull_log.rs b/rust/worker/src/execution/operators/pull_log.rs index 5e628b5887a..f62e861f7e4 100644 --- a/rust/worker/src/execution/operators/pull_log.rs +++ b/rust/worker/src/execution/operators/pull_log.rs @@ -117,7 +117,8 @@ impl Operator for PullLogsOperator { } num_records_read += logs.len(); - offset += batch_size as i64; + // unwrap here is safe because we just checked if empty + offset = logs.last().unwrap().log_offset + 1; result.append(&mut logs); // We used a a timestamp and we didn't get a full batch, so we have retrieved