Skip to content

Conversation

@sarthakaggarwal97
Copy link
Contributor

Resolves #2184

@codecov
Copy link

codecov bot commented Aug 1, 2025

Codecov Report

❌ Patch coverage is 94.11765% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.39%. Comparing base (1fbf5fb) to head (922ffc9).
⚠️ Report is 9 commits behind head on unstable.

Files with missing lines Patch % Lines
src/cluster_legacy.c 94.11% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #2409      +/-   ##
============================================
- Coverage     71.55%   71.39%   -0.17%     
============================================
  Files           123      123              
  Lines         67453    67487      +34     
============================================
- Hits          48268    48184      -84     
- Misses        19185    19303     +118     
Files with missing lines Coverage Δ
src/cluster_legacy.c 86.99% <94.11%> (+0.03%) ⬆️

... and 13 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.

Copy link
Contributor

@murphyjacob4 murphyjacob4 left a comment

Choose a reason for hiding this comment

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

Thanks! Overall change LGTM, just a few comments

@sarthakaggarwal97 sarthakaggarwal97 self-assigned this Aug 1, 2025
@sarthakaggarwal97 sarthakaggarwal97 marked this pull request as ready for review August 1, 2025 21:18
Copy link
Contributor

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

Good work! I just looked quickly and put a small comment. Jacob: It's great that you're reviewing this.

Signed-off-by: Sarthak Aggarwal <[email protected]>
Signed-off-by: Sarthak Aggarwal <[email protected]>
Copy link
Contributor

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

Lgtm but not a full review. I'll merge when @murphyjacob4 has approved.

clusterNode *getMigratingSlot(int slot) {
dictEntry *de = dictFind(server.cluster->migrating_slots_to, &slot);
clusterNode *getMigratingSlotDest(int slot) {
dictEntry *de = dictFind(server.cluster->migrating_slots_to, (void *)(long)slot);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: For maximum portability, i guess we should ideally use intptr_t instead of long in these casts. There is no guarantee in the C standard that long is pointer-sized but intptr_t always is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TIL! I have made the change. thank you

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just fyi, I referenced it from here, I am not sure if this nit would fit there too!

Copy link
Contributor

Choose a reason for hiding this comment

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

I am going to update that before someone can leave a comment :)

Signed-off-by: Sarthak Aggarwal <[email protected]>
Copy link
Contributor

@murphyjacob4 murphyjacob4 left a comment

Choose a reason for hiding this comment

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

Looks good!

@zuiderkwast zuiderkwast merged commit 1d20026 into valkey-io:unstable Aug 5, 2025
52 checks passed
allenss-amazon pushed a commit to allenss-amazon/valkey-core that referenced this pull request Aug 19, 2025
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.

Consider using dictionary for migrating_slots_to/importing_slots_from

3 participants