Repository navigation
Conversation
Signed-off-by: Ashwin Somasundara <ashwin.somasundara@gmail.com>
ashwinhs
requested review from
KarstenSchnitter,
Zhangxunmt,
dinujoh,
divbok,
dlvenable,
graytaylor0,
kkondaka,
oeyh,
san81,
sb2k16,
srikanthjg and
srikanthpadakanti
as code owners
November 1, 2026 18:03
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
| assertThat(getLock(objectUnderTest).isLocked(), equalTo(false)); | ||
| } | ||
|
|
||
| private ReentrantLock getLock(final KafkaSink kafkaSink) { |
Collaborator
There was a problem hiding this comment.
Thanks @ashwinhs, the fix looks good. A small thought: could the tests check behavior instead of reading the lock field? For example, after an empty or failing doOutput, a doOutput from another thread should still finish. That way the tests do not depend on a private field name.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
KafkaSink.doOutputcould return with the lock still held, on empty records or when setup failed. The next call from another thread would then block forever.Moved the empty check before the lock and the unlock into
finally.Issues Resolved
Part of #7133. This fixes the lock only, not the
prepareTopicAndSchema()call.Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.