workaround premature recycling (compression related)#2558
Merged
jackshirazi merged 1 commit intoelastic:mainfrom Mar 31, 2022
Merged
Conversation
felixbarny
approved these changes
Mar 29, 2022
Comment on lines
+416
to
+420
| String compressionStrategy = composite.getCompressionStrategy(); | ||
| if (compressionStrategy == null) { | ||
| //lose the compression rather than retry, so that the application proceeds with minimum delay | ||
| return false; | ||
| } |
There was a problem hiding this comment.
Thank you for working on this! I'd be happy to test the workaround.
I was wondering if the retry could have a kind of fail-safe, aborting after a fixed number of retries. Something similar to:
Suggested change
| String compressionStrategy = composite.getCompressionStrategy(); | |
| if (compressionStrategy == null) { | |
| //lose the compression rather than retry, so that the application proceeds with minimum delay | |
| return false; | |
| } | |
| String compressionStrategy; | |
| for (int i = 0; i < 100 && compressionStrategy == null; ++i) { | |
| compressionStrategy = composite.getCompressionStrategy(); | |
| } | |
| if (compressionStrategy == null) { | |
| // lose the compression rather than retry, so that the application proceeds with minimum delay | |
| return false; | |
| } |
But I assume the workaround will be removed soon, once the root cause is found?
Contributor
Author
There was a problem hiding this comment.
Let's see how it looks when you try it. We might prefer to leave the fast fail so that there is minimum impact to the application. When we've eliminated premature recycling, this concurrent race should happen rarely. At most I think I'd retry only once
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.
What does this PR do?
lose the compression rather than retry looking for strategy, so that the application proceeds with minimum delay - branch to see if this works for the customer as a temporary workaround
Checklist