Skip to content

Commit

Permalink
Split dual-channel output buffer overrun tests to separate servers
Browse files Browse the repository at this point in the history
1. The test isn't waiting long enough for the output buffer to overrun. This problem is happening because an error from the previous test is bleeding into the current test's logs. The simplest fix would be to split these tests.
2. Increased replication timeout to ensure sync fails due to output buffer overrun before a timeout occurs.

Solve valkey-io#1367

Signed-off-by: naglera <[email protected]>
  • Loading branch information
naglera committed Nov 28, 2024
1 parent a939cb8 commit f3bd992
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion tests/integration/dual-channel-replication.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ start_server {tags {"dual-channel-replication external:skip"}} {

$replica config set dual-channel-replication-enabled yes
$replica config set loglevel debug
$replica config set repl-timeout 10
$replica config set repl-timeout 60
$primary config set repl-backlog-size 1mb

test "Test dual-channel-replication primary gets cob overrun before established psync" {
Expand Down Expand Up @@ -815,6 +815,37 @@ start_server {tags {"dual-channel-replication external:skip"}} {
} else {
fail "Primary should abort sync"
}
stop_write_load $load_handle0
stop_write_load $load_handle1
stop_write_load $load_handle2
}
}

start_server {tags {"dual-channel-replication external:skip"}} {
set primary [srv 0 client]
set primary_host [srv 0 host]
set primary_port [srv 0 port]
set loglines [count_log_lines 0]

$primary config set repl-diskless-sync yes
$primary config set dual-channel-replication-enabled yes
$primary config set client-output-buffer-limit "replica 1100k 0 0"
$primary config set loglevel debug
start_server {} {
set replica [srv 0 client]
set replica_host [srv 0 host]
set replica_port [srv 0 port]
set replica_log [srv 0 stdout]
set replica_pid [srv 0 pid]

set load_handle0 [start_write_load $primary_host $primary_port 60]
set load_handle1 [start_write_load $primary_host $primary_port 60]
set load_handle2 [start_write_load $primary_host $primary_port 60]

$replica config set dual-channel-replication-enabled yes
$replica config set loglevel debug
$replica config set repl-timeout 60
$primary config set repl-backlog-size 1mb

$replica debug pause-after-fork 1
$primary debug populate 1000 primary 100000
Expand Down

0 comments on commit f3bd992

Please sign in to comment.