Skip to content

Deflake chained replicas disconnect#574

Merged
madolson merged 1 commit intovalkey-io:unstablefrom
naglera:deflake-tcl-tests
Jun 3, 2024
Merged

Deflake chained replicas disconnect#574
madolson merged 1 commit intovalkey-io:unstablefrom
naglera:deflake-tcl-tests

Conversation

@naglera
Copy link
Copy Markdown
Contributor

@naglera naglera commented May 30, 2024

Deflake chained replicas disconnect when replica re-connect with the same master. sync_partial_ok counter might get incremented if replica timed out during test.

Deflake chained replicas disconnect when replica re-connect with the same
master. sync_partial_ok counter might get incremented if replica timed
out during test.

Signed-off-by: naglera <anagler123@gmail.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.22%. Comparing base (6bab2d7) to head (fc49a00).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable     #574      +/-   ##
============================================
+ Coverage     70.07%   70.22%   +0.14%     
============================================
  Files           109      109              
  Lines         59956    59956              
============================================
+ Hits          42016    42105      +89     
+ Misses        17940    17851      -89     

see 13 files with indirect coverage changes

@madolson
Copy link
Copy Markdown
Member

@naglera do you have an example of this happening?

@naglera
Copy link
Copy Markdown
Contributor Author

naglera commented Jun 2, 2024

At line 222 in the test we set the master repl-ping-replica-period to 100 seconds. On a busy machine executing test lines 225 to 226 may take more then repl-timeout, forcing the replica to psync again, which increments sync_partial_ok and fail the test.

        # Disconnect the master's direct replica
        $R(0) client kill type replica
--->
        wait_for_condition 50 1000 {
            [status $R(1) master_link_status] == "up" && 
            [status $R(2) master_link_status] == "up" &&
            [status $R(0) sync_partial_ok] == $sync_partial_master + 1 &&
            [status $R(1) sync_partial_ok] == $sync_partial_replica
        } else {
            fail "Disconnected replica failed to PSYNC with master"
        }

@madolson madolson merged commit 28e055a into valkey-io:unstable Jun 3, 2024
@madolson madolson added the de-crapify Correct crap decisions made in the past label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

de-crapify Correct crap decisions made in the past

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants