Fix bug causing no response flush sometimes when IO threads are busy#3205
Merged
murphyjacob4 merged 1 commit intovalkey-io:unstablefrom Feb 14, 2026
Merged
Fix bug causing no response flush sometimes when IO threads are busy#3205murphyjacob4 merged 1 commit intovalkey-io:unstablefrom
murphyjacob4 merged 1 commit intovalkey-io:unstablefrom
Conversation
Signed-off-by: Jacob Murphy <jkmurphy@google.com>
Contributor
Author
|
On another note, I'm not sure if this "second read" gives much better performance. But this path is very unlikely to be triggered in our tests and feels like a time bomb given the low path coverage. Maybe we should consider removing it. But let's fix it first |
Contributor
Author
|
I think we need to backport down to 8.0. Although I had trouble reproducing since without the pipeline optimization it doesn't seem as likely to trigger. https://github.com/valkey-io/valkey/blob/8.0/src/server.c#L1719-L1722 |
enjoy-binbin
approved these changes
Feb 14, 2026
Member
enjoy-binbin
left a comment
There was a problem hiding this comment.
It looks like a clever trick.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## unstable #3205 +/- ##
================================
================================
🚀 New features to boost your workflow:
|
roshkhatri
pushed a commit
to roshkhatri/valkey
that referenced
this pull request
Feb 17, 2026
…alkey-io#3205) Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
roshkhatri
pushed a commit
to roshkhatri/valkey
that referenced
this pull request
Feb 17, 2026
…alkey-io#3205) Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
roshkhatri
pushed a commit
to roshkhatri/valkey
that referenced
this pull request
Feb 18, 2026
roshkhatri
pushed a commit
to roshkhatri/valkey
that referenced
this pull request
Feb 18, 2026
…alkey-io#3205) Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
harrylin98
pushed a commit
to harrylin98/valkey_forked
that referenced
this pull request
Feb 19, 2026
roshkhatri
pushed a commit
to roshkhatri/valkey
that referenced
this pull request
Feb 20, 2026
…alkey-io#3205) Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
roshkhatri
pushed a commit
to roshkhatri/valkey
that referenced
this pull request
Feb 20, 2026
…alkey-io#3205) Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
roshkhatri
pushed a commit
to roshkhatri/valkey
that referenced
this pull request
Feb 20, 2026
…alkey-io#3205) Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
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.
When we attempt to process commands from IO thread reads a second time, we never call handleClientsWithPendingWrites after that point. This sometimes causes the following sequence resulting in no response flush:
Adding a second call to handleClientsWithPendingWrites should fix it. This call should be cheap since it fast returns when there are no pending writes.
Fixes #3198