Skip to content

Conversation

bseto
Copy link
Contributor

@bseto bseto commented May 10, 2025

@git-hulk I based the PR on your previous PR.

For some additional context: #308 (comment)


Did some manual testing

  1. Works on it's own with a brand new cluster created with this new kvrocks-controller
  2. Works with a pre-existing cluster that had a -1 migrating_slot value
  3. Does not work with my most recent unstable branch with the null value. (so any clusters created from May 3rd to now will not be compatible)

)

const (
NotMigratingString = "not-migrating"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Up to suggestions on what string we want here...

@bseto bseto changed the title Bseto/fix/issue 306 based on git hulks Bseto/fix/issue 306 based on git hulks work May 10, 2025
@bseto bseto marked this pull request as ready for review May 11, 2025 08:55
@git-hulk
Copy link
Member

@bseto Thanks for your efforts.

@codecov-commenter
Copy link

codecov-commenter commented May 11, 2025

Codecov Report

Attention: Patch coverage is 75.67568% with 18 lines in your changes missing coverage. Please review.

Project coverage is 46.76%. Comparing base (6c56470) to head (a085743).
Report is 62 commits behind head on unstable.

Files with missing lines Patch % Lines
store/slot.go 81.66% 10 Missing and 1 partial ⚠️
controller/cluster.go 0.00% 3 Missing ⚠️
cmd/client/command/helper.go 0.00% 2 Missing ⚠️
store/cluster.go 50.00% 1 Missing ⚠️
store/cluster_shard.go 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           unstable     #310      +/-   ##
============================================
+ Coverage     43.38%   46.76%   +3.37%     
============================================
  Files            37       45       +8     
  Lines          2971     4386    +1415     
============================================
+ Hits           1289     2051     +762     
- Misses         1544     2128     +584     
- Partials        138      207      +69     
Flag Coverage Δ
unittests 46.76% <75.67%> (+3.37%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

if shard.MigratingSlot != nil {
migratingStatus = fmt.Sprintf("%s --> %d", shard.MigratingSlot, shard.TargetShardIndex)
if shard.MigratingSlot.IsMigrating {
migratingStatus = fmt.Sprintf("%s --> %d", &shard.MigratingSlot.SlotRange, shard.TargetShardIndex)
Copy link
Member

Choose a reason for hiding this comment

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

It should be good without &?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

woops

)

const (
NotMigratingString = "not-migrating"
Copy link
Member

Choose a reason for hiding this comment

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

We could keep the field null if it's not migrating.

@bseto bseto marked this pull request as draft May 12, 2025 17:49
@bseto bseto marked this pull request as ready for review May 12, 2025 20:46
@bseto bseto marked this pull request as draft May 12, 2025 21:12
@bseto bseto marked this pull request as ready for review May 12, 2025 21:24
@git-hulk git-hulk merged commit 2c834b4 into apache:unstable May 13, 2025
4 checks passed
@git-hulk git-hulk changed the title Bseto/fix/issue 306 based on git hulks work Fix the migrating slot didn't compatible with old format May 13, 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.

3 participants