Skip to content

Conversation

@enjoy-binbin
Copy link
Member

PSYNC_FULLRESYNC_DUAL_CHANNEL is also a full sync, as the comment says,
we need to allow it. I also tested it by modifying some code locally.

PSYNC_FULLRESYNC_DUAL_CHANNEL is also a full sync, as the comment says,
we need to allow it. I also tested it by modifying some code locally.

Signed-off-by: Binbin <binloveplay1314@qq.com>
@codecov
Copy link

codecov bot commented Sep 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.22%. Comparing base (6c1bb73) to head (130d028).
⚠️ Report is 1 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #2659      +/-   ##
============================================
+ Coverage     72.10%   72.22%   +0.12%     
============================================
  Files           127      127              
  Lines         70935    70936       +1     
============================================
+ Hits          51146    51235      +89     
+ Misses        19789    19701      -88     
Files with missing lines Coverage Δ
src/replication.c 85.83% <100.00%> (-0.22%) ⬇️

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

@zuiderkwast
Copy link
Contributor

Which scenario is this exactly? If you could test it locally, I guess a TCL test would also be possible to write...

Who is more suited to review dual-channel replication stuff? Not me...

@hpatro hpatro requested a review from naglera September 29, 2025 17:28
@enjoy-binbin
Copy link
Member Author

Which scenario is this exactly? If you could test it locally, I guess a TCL test would also be possible to write...

it is another full sync, just in this code, PSYNC_FULLRESYNC with dual-channel enabled scenario. We did not add the test before, when i test it locally, i use some debug code (like a debug config just refuse the psync). It is hard to reproduce in a real world i think (since the failover and psync are happen in the same time).

    if (server.failover_state == FAILOVER_IN_PROGRESS) {
        if (psync_result == PSYNC_CONTINUE || psync_result == PSYNC_FULLRESYNC) {
            clearFailoverState();
        } else {
            abortFailover("Failover target rejected psync request");
            return;
        }
    }

Copy link
Collaborator

@hpatro hpatro 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 to me.

@zuiderkwast zuiderkwast moved this to In Progress in Valkey 9.1 Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants