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

Split dual-channel COB overrun tests to separate servers #1374

Merged
merged 1 commit into from
Dec 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"}} {
Copy link
Member

Choose a reason for hiding this comment

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

Can restart_instance be used instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

restart_instance could be used here, but splitting tests to different servers simplifies debugging by separating logs and avoids unnecessary test coupling. These tests don't require shared server state.

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
Loading