Skip to content
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

Fix replica unable trigger migration when it received CLUSTER SETSLOT in advance #981

Merged
merged 11 commits into from
Sep 13, 2024

Commits on Sep 11, 2024

  1. Fix replica unable trigger migration when it received CLUSTER SETSLOT…

    … in advance
    
    When the primary and replica cluster-allow-replica-migration configuration items are
    different, the replica migration does not meet expectations.
    
    Originally: primary not allow, replica allow. In this case, the code will migrate the
    replica away, and the primary will keep as an empty primary. However, in valkey-io#970, we found
    a timing issue. For example, if the replica receives CLUSTER SETSLOT first and then receives
    the gossip change, it will not trigger the replica-migration.
    
    We perform replica migration explicitly in CLUSTER SETSLOT in this case.
    
    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    3aef09e View commit details
    Browse the repository at this point in the history
  2. fix format

    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    cef953a View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2024

  1. Merge remote-tracking branch 'upstream/unstable' into better_replica_…

    …migration
    
    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    01fb912 View commit details
    Browse the repository at this point in the history
  2. code review from Ping

    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    5603e98 View commit details
    Browse the repository at this point in the history
  3. Update src/cluster_legacy.c

    Co-authored-by: Ping Xie <pingxie@outlook.com>
    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin and PingXie authored Sep 12, 2024
    Configuration menu
    Copy the full SHA
    81f27c8 View commit details
    Browse the repository at this point in the history
  4. Update src/cluster_legacy.c

    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin authored Sep 12, 2024
    Configuration menu
    Copy the full SHA
    3df8cbe View commit details
    Browse the repository at this point in the history
  5. Update src/cluster_legacy.c

    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin authored Sep 12, 2024
    Configuration menu
    Copy the full SHA
    87da96b View commit details
    Browse the repository at this point in the history
  6. Update src/cluster_legacy.c

    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin authored Sep 12, 2024
    Configuration menu
    Copy the full SHA
    3f69a1c View commit details
    Browse the repository at this point in the history
  7. Handle freeClientAsync did not respect full_sync_required

    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    fc3f0c3 View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2024

  1. Apply suggestions from code review

    Co-authored-by: Ping Xie <pingxie@outlook.com>
    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin and PingXie authored Sep 13, 2024
    Configuration menu
    Copy the full SHA
    8896c0e View commit details
    Browse the repository at this point in the history
  2. fix format

    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    f9abd82 View commit details
    Browse the repository at this point in the history