Align rejected unblocked commands to update the correct error statistic#577
Merged
ranshid merged 8 commits intovalkey-io:unstablefrom Jan 1, 2025
Merged
Conversation
Currently, in case a blocked command is unblocked externally (eg. due to the relevant slot being migrated or the CLIENT UNBLOCK command was issued, the command statistics will always update the failed_calls error statistic. This leads to missalignment with valkey-io@90b9f08 as well as some inconsistencies. For example when a key is migrated during cluster slot migration, clients blocked on XREADGROUP will be unblocked and update the rejected_calls stat, while clients blocked on BLPOP will get unblocked updating the failed_calls stat. In this PR we add explicit indication in updateStatsOnUnblock thet indicates if the command was rejected or failed. Signed-off-by: ranshid <ranshid@amazon.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #577 +/- ##
============================================
+ Coverage 70.71% 70.78% +0.07%
============================================
Files 119 119
Lines 64652 64699 +47
============================================
+ Hits 45717 45800 +83
+ Misses 18935 18899 -36
|
Signed-off-by: ranshid <ranshid@amazon.com>
Signed-off-by: ranshid <ranshid@amazon.com>
Signed-off-by: ranshid <ranshid@amazon.com>
Member
|
@ranshid Can you update this? I remember discussing this but I guess it fell between the cracks. |
Contributor
I don't have the context. @ranshid What's remaining here? |
hpatro
reviewed
Nov 26, 2024
…of-unblocked-clients
Signed-off-by: Ran Shidlansik <ranshid@amazon.com>
Member
Author
Signed-off-by: Ran Shidlansik <ranshid@amazon.com>
hpatro
approved these changes
Dec 17, 2024
Contributor
|
This is a minor change in behavior. @madolson Do you folks vote on this as well? |
kronwerk
pushed a commit
to kronwerk/valkey
that referenced
this pull request
Jan 27, 2025
…ic (valkey-io#577) Currently, in case a blocked command is unblocked externally (eg. due to the relevant slot being migrated or the CLIENT UNBLOCK command was issued, the command statistics will always update the failed_calls error statistic. This leads to missalignment with valkey-io@90b9f08 as well as some inconsistencies. For example when a key is migrated during cluster slot migration, clients blocked on XREADGROUP will be unblocked and update the rejected_calls stat, while clients blocked on BLPOP will get unblocked updating the failed_calls stat. In this PR we add explicit indication in updateStatsOnUnblock thet indicates if the command was rejected or failed. --------- Signed-off-by: ranshid <ranshid@amazon.com> Signed-off-by: Ran Shidlansik <ranshid@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.
Currently, in case a blocked command is unblocked externally (eg. due to the relevant slot being migrated or the CLIENT UNBLOCK command was issued, the command statistics will always update the failed_calls error statistic. This leads to missalignment with 90b9f08 as well as some inconsistencies. For example when a key is migrated during cluster slot migration, clients blocked on XREADGROUP will be unblocked and update the rejected_calls stat, while clients blocked on BLPOP will get unblocked updating the failed_calls stat.
In this PR we add explicit indication in updateStatsOnUnblock thet indicates if the command was rejected or failed.