Skip to content

Commit

Permalink
[BUG] InMemoryLog preserve offset orders
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishiihara committed May 3, 2024
1 parent 97dbe40 commit e999232
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rust/worker/src/execution/operators/pull_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ impl Operator<PullLogsInput, PullLogsOutput> 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
Expand Down

0 comments on commit e999232

Please sign in to comment.