-
Notifications
You must be signed in to change notification settings - Fork 707
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
Enable module API SendClusterMessage to use light message header type #1572
Enable module API SendClusterMessage to use light message header type #1572
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #1572 +/- ##
============================================
- Coverage 71.02% 70.95% -0.08%
============================================
Files 121 121
Lines 65177 65225 +48
============================================
- Hits 46295 46282 -13
- Misses 18882 18943 +61
|
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.
It looks pretty good, but we need cross-version testing IMO with a mixed cluster to make sure it works during rolling upgrade, i.e. a mixed cluster. Can you take my work from #1371 and add it here? Or help completing it.
@zuiderkwast just out of curiosity what is pending over here? I see @madolson approved the PR as well. I can help contribute / complete it. |
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.
Very nice! Some minor comments.
assert_equal OK [$node1 test.pingall] | ||
assert_equal 2 [CI 0 cluster_stats_messages_module_sent] | ||
wait_for_condition 50 100 { | ||
[CI 1 cluster_stats_messages_module_received] eq 1 && |
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.
We don't check that the message receiver callback was called. Should we?
An idea is to let test.pingall
be a blocking command that waits for the pong from each node and returns the number of replies, but maybe that's more complicated. You can decide.
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.
Yeah, we don't. We lack coverage for module message receiver callback. The stat counter ticks only if the payload is valid. So, we confirm that the target is able to process the packet i.e. if it's valid only.
I think it's beyond the scope of this PR to verify the callback. I will file an (good first) issue.
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.
LGTM.
I added one suggestion but I'm not sure if it's objectively better or not so you can decide. :)
If you feel like adding some test coverage for the module message receiver callback API in another PR, that would be nice.
7bcf752
to
1583bef
Compare
There are some committs from other PRs here now. Some rebased/merge mistake? If you reset hard to before the last merge commit and then rebase again, the strange ones should disappear. Try that? Anyway, seems good to merge. |
Is it intentional the new test isn't getting run anywhere? Only the main test runs with other server, this one doesn't run anywhere. |
df720b2
to
1a2ba84
Compare
Signed-off-by: Harkrishn Patro <[email protected]>
Signed-off-by: Harkrishn Patro <[email protected]>
Signed-off-by: Harkrishn Patro <[email protected]>
Signed-off-by: Harkrishn Patro <[email protected]>
Signed-off-by: Harkrishn Patro <[email protected]>
Signed-off-by: Harkrishn Patro <[email protected]>
Signed-off-by: Harkrishn Patro <[email protected]>
Signed-off-by: Harkrishn Patro <[email protected]>
Signed-off-by: Harkrishn Patro <[email protected]>
Signed-off-by: Harkrishn Patro <[email protected]>
Signed-off-by: Harkrishn Patro <[email protected]>
Signed-off-by: Harkrishn Patro <[email protected]>
Signed-off-by: Harkrishn Patro <[email protected]>
Signed-off-by: Harkrishn Patro <[email protected]>
Co-authored-by: Viktor Söderqvist <[email protected]> Signed-off-by: Harkrishn Patro <[email protected]> Signed-off-by: Harkrishn Patro <[email protected]>
1a2ba84
to
d29df94
Compare
Looks like a bad merge. Couldn't fix it via merge. Did a rebase and force pushed it. |
This change uses the light message header for cluster module message type to be sent to a target node or broadcast across the cluster. The light message header was introduced in Valkey 8 to reduce network in/out over clusterbus and have been already used for pub/sub message transfer. It's only used if the target node supports the light message header (~30B) otherwise it falls back to using the regular header (~2KB). The module API
VM_SendClusterMessage
remains as is.