gomnitrix opened a new pull request, #2794: URL: https://github.com/apache/iggy/pull/2794
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> Closes #2730 ## Rationale <!-- Why is this change needed? If the issue explains it well, a one-liner is fine. --> Consumers shouldn't be able to store offsets for messages that haven't been written to the partition yet. ## What changed? Before this, [store_consumer_offset](https://github.com/apache/iggy/blob/aff29a544372fe5487598339830dafecb39aa14e/core/server/src/shard/system/consumer_offsets.rs#L35) would accept basically any offset you threw at it. Now it validates the requested offset against the partition's `current_offset` and throws an `InvalidOffset` error if it's out of bounds. It also completely blocks storing any offset on empty partitions. Added integration tests to cover these boundaries for both single consumers and groups. ## Local Execution - Passed - Pre-commit hooks ran <!-- You must run your code locally before submitting. "Relying on CI" is not acceptable - PRs from authors who haven't run the code will be closed. Did you have `prek` installed? It runs automatically on commit and covers all project languages. See [CONTRIBUTING.md](https://github.com/apache/iggy/blob/master/CONTRIBUTING.md). --> ## AI Usage 1. Which tools? Google Antigravity with Gemini 3.1 pro 2. Scope of usage? Autocomplete and code review 3. How did you verify the generated code works correctly? Wrote and ran the new `invalid_consumer_offset` integration tests locally to verify the exact boundary conditions. 4. Can you explain every line of the code if asked? Yes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
