Skip to content

Conversation

@hwware
Copy link
Contributor

@hwware hwware commented Apr 8, 2025

No other functions use the return value of clusterNodeSetSlotBit(), thus this PR update the return type to void and
update the comments.

@hwware hwware force-pushed the update-function-return-type branch from 2b911a1 to 78560b0 Compare April 8, 2025 15:11
@codecov
Copy link

codecov bot commented Apr 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.86%. Comparing base (44dafba) to head (571cb82).
Report is 2 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1934      +/-   ##
============================================
- Coverage     70.99%   70.86%   -0.14%     
============================================
  Files           123      123              
  Lines         65769    65768       -1     
============================================
- Hits          46693    46604      -89     
- Misses        19076    19164      +88     
Files with missing lines Coverage Δ
src/cluster_legacy.c 86.02% <100.00%> (-0.07%) ⬇️

... and 10 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

/* Set the slot bit */
void clusterNodeSetSlotBit(clusterNode *n, int slot) {
int old = bitmapTestBit(n->slots, slot);
if (!old) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if(!bitmapTestBit(n->slots, slot)) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your comments. It is removed now.


/* Set the slot bit and return the old value. */
int clusterNodeSetSlotBit(clusterNode *n, int slot) {
/* Set the slot bit */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant. The function name clusterNodeSetSlotBit already says it.

hwware added 2 commits April 9, 2025 15:08
Signed-off-by: hwware <wen.hui.ware@gmail.com>
Signed-off-by: hwware <wen.hui.ware@gmail.com>
@hwware hwware force-pushed the update-function-return-type branch 2 times, most recently from 7a7dbe1 to 571cb82 Compare April 9, 2025 15:09
@zuiderkwast zuiderkwast merged commit 51387dd into valkey-io:unstable Apr 13, 2025
51 checks passed
hwware added a commit to wuranxx/valkey that referenced this pull request Apr 24, 2025
…o#1934)

No other functions use the return value of clusterNodeSetSlotBit(), thus
this PR update the return type to void and
update the comments.

---------

Signed-off-by: hwware <wen.hui.ware@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants