-
Notifications
You must be signed in to change notification settings - Fork 331
SAMZA-1832: Fix race condition between StreamProcessor and SamzaContainerListener #673
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
Closed
Conversation
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
Contributor
Author
|
@nickpan47 @prateekm @shanthoosh |
prateekm
reviewed
Sep 28, 2018
samza-core/src/main/java/org/apache/samza/processor/StreamProcessor.java
Show resolved
Hide resolved
prateekm
reviewed
Sep 28, 2018
samza-core/src/main/java/org/apache/samza/processor/StreamProcessor.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/java/org/apache/samza/processor/StreamProcessor.java
Show resolved
Hide resolved
shanthoosh
reviewed
Sep 28, 2018
samza-core/src/main/java/org/apache/samza/processor/StreamProcessor.java
Show resolved
Hide resolved
samza-test/src/test/java/org/apache/samza/test/framework/FaultInjectionTest.java
Outdated
Show resolved
Hide resolved
samza-core/src/main/scala/org/apache/samza/container/SamzaContainer.scala
Show resolved
Hide resolved
Contributor
|
Looks like there're compilation errors in new tests, please fix them. |
0748cfd to
9caa09c
Compare
shanthoosh
approved these changes
Oct 1, 2018
9caa09c to
11d577d
Compare
nickpan47
approved these changes
Oct 2, 2018
Contributor
nickpan47
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comment. lgtm. Thanks!
samza-core/src/main/java/org/apache/samza/processor/StreamProcessor.java
Show resolved
Hide resolved
asfgit
pushed a commit
that referenced
this pull request
Oct 8, 2018
Due to interleaved ordering of the PRs (#675 and #673), FaultInjectionTest is broken. Author: bharathkk <[email protected]> Reviewers: Shanthoosh Venkatraman <[email protected]> Closes #700 from bharathkk/fix-trunk
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.
The PR addresses the following issues
SamzaContainerListenerandStreamProcessorthat results in incorrect application status being propagated to clientCurrently, we only propagate failures to
processorListenerwhen containerException is not null. It is possible for the samza container to take longer thantask.shutdown.msto shutdown in which case, we need to propagate a timeout exception to theprocessorListeneras opposed assuming the shutdown was successful.Make container shutdown idempotent since its only setting a boolean flag to true and there is no need to throw an exception on subsequent invocations.
1. It simplifies the interaction of other components (
StreamProcessor) with container and prevents unnecessary check on container state to determine if its safe to call shutdown or not.2. Enables to reason about the impact of container state change on
StreamProcessoreasily since we restrict container interaction w/StreamProcessoronly viaSamzaContainerListener.