From de65c54e42932f4064c13a45d4e4f4e271b0e697 Mon Sep 17 00:00:00 2001 From: Oleg Afanasyev Date: Wed, 21 Jun 2023 13:21:51 +0100 Subject: [PATCH] rangefeed/changefeed: Enable mux rangefeeds by default. Make mux range feeds default implementation for rangefeeds. This is done in preparation for mux range feeds becoming default from release 23.2. Release note: None Release note (performance improvement): mux range feeds reuse connection and workers across multiple range feeds. This mode is now enabled by default. --- pkg/ccl/changefeedccl/changefeedbase/settings.go | 2 +- pkg/kv/kvclient/rangefeed/rangefeed.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/ccl/changefeedccl/changefeedbase/settings.go b/pkg/ccl/changefeedccl/changefeedbase/settings.go index 82974564b1ba..c5536ee1452d 100644 --- a/pkg/ccl/changefeedccl/changefeedbase/settings.go +++ b/pkg/ccl/changefeedccl/changefeedbase/settings.go @@ -233,7 +233,7 @@ var UseMuxRangeFeed = settings.RegisterBoolSetting( settings.TenantWritable, "changefeed.mux_rangefeed.enabled", "if true, changefeed uses multiplexing rangefeed RPC", - util.ConstantWithMetamorphicTestBool("changefeed.mux_rangefeed.enabled", false), + util.ConstantWithMetamorphicTestBool("changefeed.mux_rangefeed.enabled", true), ) // EventConsumerWorkers specifies the maximum number of workers to use when diff --git a/pkg/kv/kvclient/rangefeed/rangefeed.go b/pkg/kv/kvclient/rangefeed/rangefeed.go index 74d47558e30a..e308efa937e6 100644 --- a/pkg/kv/kvclient/rangefeed/rangefeed.go +++ b/pkg/kv/kvclient/rangefeed/rangefeed.go @@ -267,7 +267,7 @@ func (f *RangeFeed) Close() { // will be reset. const resetThreshold = 30 * time.Second -var useMuxRangeFeed = util.ConstantWithMetamorphicTestBool("use-mux-rangefeed", false) +var useMuxRangeFeed = util.ConstantWithMetamorphicTestBool("use-mux-rangefeed", true) // run will run the RangeFeed until the context is canceled or if the client // indicates that an initial scan error is non-recoverable.