-
Notifications
You must be signed in to change notification settings - Fork 556
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
[Backport stable/1.3] Do not open dispatcher on follower role #9377
Merged
Conversation
This file contains 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
In follower role, StreamProcessor is running only in replay mode. When the writer is created, dispatcher is also opened which allocates direct buffer. This is unnecessary as the writer is never used. The allocated buffer consumes memory and can create memory pressure on the system. To fix this, we create the writer only after the replay is completed. (cherry picked from commit c14e56f)
…ng mode (cherry picked from commit abc444d)
(cherry picked from commit 4142c7a)
(cherry picked from commit 4108d9c)
(cherry picked from commit c6d6ecd)
This is needed for testing where we want to mock the writer. (cherry picked from commit c005c6c)
After the fix where the creation of the writer is moved after the replay is completed, this test failed because the mock writer created by the test is overwritten by the StreamProcessor. To prevent this, we added a new streamWriter factor that can be used by the test to inject mock writers. (cherry picked from commit d85da02)
(cherry picked from commit 0c087af)
(cherry picked from commit 4b93b00)
Zelldon
approved these changes
May 13, 2022
bors merge |
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
Backport of #9367
related #8509