-
Notifications
You must be signed in to change notification settings - Fork 2k
[BUG]: Fix offset flushed to output collection after fn invocation #5770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
|
Separate Introduces distinct tracking for the pulled log offset of the input collection versus the output collection during compaction/attached-function execution. The change corrects a bug where the input offset was incorrectly flushed as the output collection’s compacted offset, leading to wrong Key Changes• Replaced Affected Areas• This summary was automatically generated by @propel-code-bot |
| // In practice, input_pulled_log_offset means "next offset to start compacting from" | ||
| // So to get "last offset processed"/"completion_offset", we subtract 1 | ||
| let last_offset_processed = if input.input_pulled_log_offset > 0 { | ||
| (input.input_pulled_log_offset - 1).max(0) as u64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why .max(0) if you're guaranteeing it's greater than zero?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks!
0b80e07 to
ad62555
Compare

Description of changes
Summarize the changes made by this PR.
We were flushing the input collection's pulled offset to the output collection's compacted offset field during function invocation. This change fixes that.
Test plan
How are these changes tested?
pytestfor python,yarn testfor js,cargo testfor rustMigration plan
Are there any migrations, or any forwards/backwards compatibility changes needed in order to make sure this change deploys reliably?
Observability plan
What is the plan to instrument and monitor this change?
Documentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the _docs section?_