kafka
kafka copied to clipboard
KAFKA-13817 Always sync nextTimeToEmit with wall clock
We should sync nextTimeToEmit with wall clock on each method call to ensure throttling works correctly in case of clock drift. If we dont, then in the event of significant clock drift, throttling might not happen for a long time, this can hurt performance.
I've added a unit test to simulate clock drift and verify my change works.
Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
I can also take a look by end of this week.
@qingwei91 -- What is the status of this PR? Seems there is open comments that would need to be addressed? Would be great if we could push this over the finish line.
@mjsax sorry, I will try to pick this back up this weekend
@mjsax can help approve and merge as a committer.
Thanks for the PR! Merged to trunk
.