-
Notifications
You must be signed in to change notification settings - Fork 15.4k
KAFKA-15974: Enforce that event processing respects user-provided timeout #15640
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
Merged
cadonna
merged 160 commits into
apache:trunk
from
kirktrue:KAFKA-15974-enforce-timeout-in-events
May 22, 2024
Merged
Changes from 122 commits
Commits
Show all changes
160 commits
Select commit
Hold shift + click to select a range
666d74b
WIP
kirktrue 9d6ec58
Lots more changes
kirktrue bbbfec7
Updates
kirktrue a0f6fc5
Reverting
kirktrue 72b96b5
Reverting toString() changes
kirktrue ca1f16d
Revert toString() changes
kirktrue c88fa3b
More reverting
kirktrue 3b5bc62
Reverts
kirktrue 46af018
Reverting
kirktrue 4998699
Reverts
kirktrue 1366f08
Indent SNAFU
kirktrue 73fd588
Indentation reverts
kirktrue 6030c8e
Update AsyncKafkaConsumer.java
kirktrue 7249756
Everything compiles (for now)
kirktrue 338440e
Update HeartbeatRequestManagerTest.java
kirktrue 7ee977b
Updates to fix some tests
kirktrue eff925d
Updates
kirktrue d1dfdc6
Update ApplicationEventProcessorTest.java
kirktrue 79880a4
Updates
kirktrue d96e75b
Update TopicMetadataApplicationEvent.java
kirktrue 1ee795e
Updates
kirktrue a685b4e
Update ErrorBackgroundEvent.java
kirktrue dcdb767
Updates
kirktrue de267b7
Updates
kirktrue c94bcb9
Update ApplicationEventProcessor.java
kirktrue 337c306
Update ApplicationEventProcessor.java
kirktrue 422f935
Update ApplicationEventProcessor.java
kirktrue d08d4a6
Updates to include RelaxedCompletableFuture
kirktrue fe6a890
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-requests
kirktrue 1533901
Updates
kirktrue 5d66644
Update CoordinatorRequestManager.java
kirktrue fc9d6e8
Updates
kirktrue c301d5f
Reverting whitespace and other unwanted changes
kirktrue e4d0658
Reverting whitespace-only changes
kirktrue 669edb9
Whitespace
kirktrue f963337
UGHGGHGHGHGGH
kirktrue 733f3f0
Update TopicMetadataRequestManager.java
kirktrue 8de90d6
Update ApplicationEventProcessor.java
kirktrue 296163f
Update ApplicationEventProcessor.java
kirktrue e761ba5
Updates
kirktrue e5bdf82
Reverting unnecessary changesd
kirktrue 60f9a0a
Whitespace and stuff
kirktrue 2699626
Whitespace
kirktrue b6907ab
Whitspace
kirktrue 567e3f8
Whitespace
kirktrue 0bd6c66
Delete RelaxedCompletableFuture.java
kirktrue 3e73bb7
Updates
kirktrue e4c0486
Updates
kirktrue a9ce15a
Updates
kirktrue c2b9b52
Updates
kirktrue f446644
Ugh
kirktrue 9940cf1
Update ConsumerNetworkThreadTest.java
kirktrue c1bf7d9
Update CommitApplicationEvent.java
kirktrue 8fa83c6
Proof of concept moving timeout logic to network thread
kirktrue 3b2b99a
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-requests
kirktrue 162f4fa
Merge remote-tracking branch 'origin/trunk' into KAFKA-15974-enforce-…
kirktrue 63b9546
Reverting, for the most part
kirktrue 29fdd33
WIP
kirktrue 92d1062
Updates to events
kirktrue dfec9d1
Remove Timer from ConsumerRebalanceListenerCallbackNeededEvent
kirktrue e1b1197
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-requests
kirktrue 44757aa
Updates to clean up more clumsiness
kirktrue 84c8f8d
Update ApplicationEventProcessor.java
kirktrue b3519aa
Reverting unnecessary changes
kirktrue 00eb0cb
Reverting more code to make diffs less
kirktrue 528dc4f
Update ApplicationEventProcessor.java
kirktrue 036e33b
Update EventProcessor.java
kirktrue e8dfea3
Update ApplicationEventProcessor.java
kirktrue 4eae988
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-requests
kirktrue ce7f115
Merge remote-tracking branch 'origin/trunk' into KAFKA-15974-enforce-…
kirktrue 027b232
Updates
kirktrue 1d4d6b0
Updates
kirktrue c00ffc2
Updates to timeout values
kirktrue 25eea60
Refactored the event processors and event reaper
kirktrue 83cbf6f
Updates
kirktrue 339557f
Update AsyncKafkaConsumer.java
kirktrue 22b0329
Reverting code
kirktrue 02ccdc6
Update AsyncKafkaConsumer.java
kirktrue 223aadd
More general cleanup
kirktrue 001fbe9
Reverting unnecessary changes
kirktrue 9f1dfbe
Revert unnecessary changes
kirktrue b055cef
Updates to remove unnecessary changes
kirktrue cb75d3f
Revert unnecessary changes
kirktrue e893f0f
More cleanup
kirktrue 53a4ae2
Comments changes
kirktrue 765eb22
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-requests
kirktrue d93ab5c
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-requests
kirktrue fa67c00
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-requests
kirktrue 6c431ec
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-requests
kirktrue 42c6fe6
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-events
kirktrue 6292034
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-events
kirktrue 8a7d7c3
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-events
kirktrue 968a535
Updates to include more unit tests
kirktrue c4ff61b
Updated EventProcessor JavaDoc
kirktrue dab563b
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-events
kirktrue bd3b3fc
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-events
kirktrue 69f3f91
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-events
kirktrue 9084cbd
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-events
kirktrue df70086
Refactoring for less diff noise
kirktrue 83790d4
Trying more to clean up diffs
kirktrue 7289abf
Reverting some MockTime related tweaks
kirktrue 5eeeea2
More reverts
kirktrue b520fbd
More reverts
kirktrue 211f297
Yet still more refactoring
kirktrue 26d369b
Reverting the reverts as it broke other stuff :(
kirktrue 147e5a3
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-events
kirktrue 0ae194f
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-events
kirktrue 37cb285
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-events
kirktrue 23003eb
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-events
kirktrue 7f2d231
Added a brief comment about the case where close() is called from wit…
kirktrue 0c646ad
Minor refactoring of comments and code in ConsumerNetworkThread per P…
kirktrue fd48d1f
Update clients/src/main/java/org/apache/kafka/clients/consumer/intern…
kirktrue 68beee5
Made reapIncomplete's stream processing code consistent with reapExpi…
kirktrue 337d1f7
Added calculateDeadlineMs to CompletableEvent for reuse by implementa…
kirktrue 74a7ed7
Removed EventProcessor.close() as it is no longer needed
kirktrue 92c2d85
Removed the need for explicit Long.MAX_VALUE-based Timer objects for …
kirktrue 2981ebe
Removed superfluous import
kirktrue 6c34198
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-events
kirktrue 36388d5
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-events
kirktrue 1e2144b
Updates to use long instead of Timer to indicate the deadline
kirktrue 8bec7d7
More updates to remove another usage of Timer to calculate deadline
kirktrue 097522a
Moved SyncCommitEvent to use the user-provided Duration directly
kirktrue 87b3611
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-events
kirktrue 1803dac
Reworked class-level documentation for CompletableEventReaper
kirktrue 71af574
More typos in CompletableEventReaper comments
kirktrue 63903a1
Changed the ambiguous process method to processBackgroundEvents
kirktrue 909f4dc
Changes to processBackgroundEvents comments
kirktrue 1aa4c31
Removed logging from processBackgroundEvents to simplify logic
kirktrue d8959db
Changed the signature of reapIncomplete to remove boilerplate for cal…
kirktrue 0248c92
Added back 'final' parameter qualifier
kirktrue 290b081
Made the abstract CommitEvent class' constructor protected (again)
kirktrue 987dc4a
Updated CompletableEvent.future() documentation to reflect using comp…
kirktrue 27ed6fc
Removed MockTime instances created with non-default arguments
kirktrue b54c817
Minor formatting change per feedback
kirktrue 26d64e8
Restored modified comment to ApplicationEventHandler.addAndGet()
kirktrue 5d212c2
Removed unnecessary import that broke the build
kirktrue f800e71
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-events
kirktrue a92e25e
Using a Collection instead of BlockingQueue for simplicity
kirktrue 8368718
Removed use of Timer in CompletableEventReaperTest
kirktrue 40cc477
Minor refactoring to avoid generics
kirktrue 1234c1e
Added unit test to ConsumerNetworkThread and minor refactoring/renaming
kirktrue b3b93a9
Added test to AsyncKafkaConsumerTest
kirktrue 16aa7ea
Update AsyncKafkaConsumer.java
kirktrue 40a6e76
Removing some noisy trace logging
kirktrue b51a8c0
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-events
kirktrue 7067b95
Fixed lint error
kirktrue 3d26009
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-events
kirktrue 284cf94
Update to ConsumerNetworkThread test logic
kirktrue 6a3ced6
More work on improving and simplifying unit tests
kirktrue 3018de2
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-events
kirktrue ec0edd4
Added more unit tests to ensure the reaper is being properly invoked
kirktrue 3eb054a
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-events
kirktrue 2e445c5
Merge branch 'trunk' into KAFKA-15974-enforce-timeout-in-events
kirktrue ae6a6cd
Testing expected value in timestamp-related reap tests
kirktrue 808eb4b
Added testEnsureEventsAreCompleted() back along with all its trapping
kirktrue e9ea1e6
Update testCommitAsyncWithFencedException
kirktrue 62bec7e
Changing expiration logic in CompletableEventReaper.reap() to match T…
kirktrue 0f168e2
Removed outdated logic in testCommitAsyncWithFencedException
kirktrue c423560
maybeAutoCommitSync > autoCommitSync is there's no longer a conditional
kirktrue 91af164
Refactored processBackgroundEvents to eliminate passing in the EventP…
kirktrue File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
179 changes: 92 additions & 87 deletions
179
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.