Skip to content

Commit

Permalink
Deflake vdiffs in e2e tests using load generator
Browse files Browse the repository at this point in the history
This impacted e2e tests that were not previously using VPlayerBatching.

The load generator constantly generates INSERTs, which are then
effeciently batched in vplayer so we get ~ 7x more throughput than
before and thus we need more time for filtered replication to catch
up after we've stopped it for the vdiff. ESPECIALLY since we're
using the --update-table-stats flag and the ANALYZE TABLE and its
locking causes a pause in updates to the table the load generator is
inserting into -- in particular for the test clusters that only
have PRIMARY tablets as everything is interacting directly.

Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed Nov 11, 2024
1 parent 5f5c76a commit f0f61db
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions go/test/endtoend/vreplication/vdiff_helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
)

const (
vdiffTimeout = 120 * time.Second // We can leverage auto retry on error with this longer-than-usual timeout
vdiffTimeout = 180 * time.Second // We can leverage auto retry on error with this longer-than-usual timeout
vdiffRetryTimeout = 30 * time.Second
vdiffStatusCheckInterval = 5 * time.Second
vdiffRetryInterval = 5 * time.Second
Expand Down Expand Up @@ -71,7 +71,8 @@ func doVtctlclientVDiff(t *testing.T, keyspace, workflow, cells string, want *ex
ksWorkflow := fmt.Sprintf("%s.%s", keyspace, workflow)
t.Run(fmt.Sprintf("vtctlclient vdiff %s", ksWorkflow), func(t *testing.T) {
// update-table-stats is needed in order to test progress reports.
uuid, _ := performVDiff2Action(t, true, ksWorkflow, cells, "create", "", false, "--auto-retry", "--update-table-stats")
uuid, _ := performVDiff2Action(t, true, ksWorkflow, cells, "create", "", false, "--auto-retry",
"--update-table-stats", fmt.Sprintf("--filtered_replication_wait_time=%v", vdiffTimeout/2))
info := waitForVDiff2ToComplete(t, true, ksWorkflow, cells, uuid, time.Time{})
require.NotNil(t, info)
require.Equal(t, workflow, info.Workflow)
Expand Down Expand Up @@ -164,7 +165,7 @@ func doVtctldclientVDiff(t *testing.T, keyspace, workflow, cells string, want *e
ksWorkflow := fmt.Sprintf("%s.%s", keyspace, workflow)
t.Run(fmt.Sprintf("vtctldclient vdiff %s", ksWorkflow), func(t *testing.T) {
// update-table-stats is needed in order to test progress reports.
flags := []string{"--auto-retry", "--update-table-stats"}
flags := []string{"--auto-retry", "--update-table-stats", fmt.Sprintf("--filtered-replication-wait-time=%v", vdiffTimeout/2)}
if len(extraFlags) > 0 {
flags = append(flags, extraFlags...)
}
Expand Down

0 comments on commit f0f61db

Please sign in to comment.