Skip to content

Commit

Permalink
changefeedccl: disable drain watcher by default
Browse files Browse the repository at this point in the history
#102717 introduced a mechanism allowing for an orderly shutdown of changefeed
aggregators and an up-to-date frontier information to reduce duplicates during
a node restart in 23.2. However, we've recently identified a bug that could
lead to unexpected behavior. It's unclear where the bug is yet. This patch disables
this feature by default.

Fixes: #123371
Release note: Disabled a changefeed optimization on reducing duplicates during
aggregator restarts due to its bad performance.
  • Loading branch information
wenyihu6 committed May 1, 2024
1 parent 2329856 commit b4b15f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ccl/changefeedccl/changefeed_processors.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ var aggregatorEmitsShutdownCheckpoint = settings.RegisterBoolSetting(
settings.ApplicationLevel,
"changefeed.shutdown_checkpoint.enabled",
"upon shutdown aggregator attempts to emit an up-to-date checkpoint",
true,
false,
)

type drainWatcher <-chan struct{}
Expand Down
1 change: 1 addition & 0 deletions pkg/ccl/changefeedccl/changefeed_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6207,6 +6207,7 @@ func TestChangefeedHandlesRollingRestart(t *testing.T) {

db := tc.ServerConn(1)
sqlDB := sqlutils.MakeSQLRunner(db)
serverutils.SetClusterSetting(t, tc, "changefeed.shutdown_checkpoint.enabled", true)
serverutils.SetClusterSetting(t, tc, "kv.rangefeed.enabled", true)
serverutils.SetClusterSetting(t, tc, "kv.closed_timestamp.target_duration", 10*time.Millisecond)
serverutils.SetClusterSetting(t, tc, "changefeed.experimental_poll_interval", 10*time.Millisecond)
Expand Down

0 comments on commit b4b15f8

Please sign in to comment.