Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Rohit Nayak <[email protected]>
  • Loading branch information
rohit-nayak-ps committed Feb 9, 2023
1 parent 6494457 commit 6cd59ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 6 additions & 7 deletions go/vt/vttablet/tabletmanager/vreplication/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,12 @@ func newController(ctx context.Context, params map[string]string, dbClientFactor
}

ct := &controller{
vre: vre,
dbClientFactory: dbClientFactory,
mysqld: mysqld,
blpStats: blpStats,
done: make(chan struct{}),
source: &binlogdatapb.BinlogSource{},
lastWorkflowError: newLastError("VReplication Controller", maxTimeToRetryError),
vre: vre,
dbClientFactory: dbClientFactory,
mysqld: mysqld,
blpStats: blpStats,
done: make(chan struct{}),
source: &binlogdatapb.BinlogSource{},
}
log.Infof("creating controller with cell: %v, tabletTypes: %v, and params: %v", cell, tabletTypesStr, params)

Expand Down
2 changes: 2 additions & 0 deletions go/vt/vttablet/tabletmanager/vreplication/last_error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ func TestLastError(t *testing.T) {
time.Sleep(1 * time.Millisecond)
}
require.True(t, le.shouldRetry())

// same error happens after maxTimeInError, so it should retry
time.Sleep(150 * time.Millisecond)
le.record(err2)
require.True(t, le.shouldRetry())
Expand Down

0 comments on commit 6cd59ae

Please sign in to comment.