0xffff-zhiyan commented on PR #23737:
URL: https://github.com/apache/kafka/pull/23737#issuecomment-6177375817
Thanks for the PR. It's really a great find! The fix LGTM.
I think this bug also reveals we're actually missing a check that
`MetadataLoader` only gets committed records
Could we add a cheap check in `MetadataLoader#handleCommit` using the
existing `highWaterMarkAccessor`,
e.g:
```
OptionalLong hwm = highWaterMarkAccessor.get();
if (hwm.isPresent() && batch.lastOffset() >= hwm.getAsLong()) {
throw new IllegalStateException(...);
}
```
With this fix in theory it'd never fire anyway, just a tripwire for future
regressions.
--
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]