Skip to content

Commit c8892d6

Browse files
committed
kvcoord: default KeepRefreshSpansOnSavepointRollback to true
Now that cockroachdb#113765 is resolved, we can flip the default of the `KeepRefreshSpansOnSavepointRollback` cluster setting, which will enable transactions to keep refresh spans across savepoint rollbacks. See cockroachdb#111228 to more details. Part of: cockroachdb#111228 Release note: None
1 parent dd5bc70 commit c8892d6

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

pkg/kv/kvclient/kvcoord/txn_interceptor_span_refresher.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,11 @@ var MaxTxnRefreshSpansBytes = settings.RegisterIntSetting(
5050
// to impact customers because they should already be able to handle
5151
// serialization errors; in case any unforeseen customer issues arise, the
5252
// setting here allows us to revert to the old behavior.
53-
// TODO(mira): set the default to true after #113765.
5453
var KeepRefreshSpansOnSavepointRollback = settings.RegisterBoolSetting(
5554
settings.SystemVisible,
5655
"kv.transaction.keep_refresh_spans_on_savepoint_rollback.enabled",
5756
"if enabled, all refresh spans accumulated since a savepoint was created are kept after the savepoint is rolled back",
58-
false)
57+
true)
5958

6059
// txnSpanRefresher is a txnInterceptor that collects the read spans of a
6160
// serializable transaction in the event it gets a serializable retry error. It

pkg/kv/kvnemesis/kvnemesis_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,6 @@ func (cfg kvnemesisTestCfg) testClusterArgs(
175175
}
176176

177177
st := cluster.MakeTestingClusterSettings()
178-
// TODO(mira): Remove this cluster setting once the default is set to true.
179-
kvcoord.KeepRefreshSpansOnSavepointRollback.Override(ctx, &st.SV, true)
180178
kvcoord.NonTransactionalWritesNotIdempotent.Override(ctx, &st.SV, true)
181179
if cfg.leaseTypeOverride != 0 {
182180
kvserver.OverrideDefaultLeaseType(ctx, &st.SV, cfg.leaseTypeOverride)

0 commit comments

Comments
 (0)