@@ -14,31 +14,20 @@ import (
1414 "context"
1515 "time"
1616
17- "github.com/cockroachdb/cockroach/pkg/clusterversion"
1817 "github.com/cockroachdb/cockroach/pkg/keys"
1918 "github.com/cockroachdb/cockroach/pkg/kv/kvpb"
2019 "github.com/cockroachdb/cockroach/pkg/kv/kvserver/batcheval/result"
2120 "github.com/cockroachdb/cockroach/pkg/kv/kvserver/kvserverpb"
2221 "github.com/cockroachdb/cockroach/pkg/kv/kvserver/lockspanset"
2322 "github.com/cockroachdb/cockroach/pkg/kv/kvserver/spanset"
2423 "github.com/cockroachdb/cockroach/pkg/roachpb"
25- "github.com/cockroachdb/cockroach/pkg/settings"
2624 "github.com/cockroachdb/cockroach/pkg/storage"
2725 "github.com/cockroachdb/cockroach/pkg/storage/enginepb"
2826 "github.com/cockroachdb/cockroach/pkg/storage/fs"
2927 "github.com/cockroachdb/cockroach/pkg/util/hlc"
3028 "github.com/cockroachdb/errors"
3129)
3230
33- // enableStickyGCHint controls whether the sticky GCHint is enabled.
34- var enableStickyGCHint = settings .RegisterBoolSetting (
35- settings .SystemOnly ,
36- "kv.gc.sticky_hint.enabled" ,
37- "enable writing sticky GC hints which expedite garbage collection after schema changes" +
38- " (ignored and assumed 'true' in 23.2)" ,
39- false ,
40- )
41-
4231func init () {
4332 RegisterReadWriteCommand (kvpb .DeleteRange , declareKeysDeleteRange , DeleteRange )
4433}
@@ -152,14 +141,7 @@ func DeleteRange(
152141 return err
153142 }
154143
155- updated := false
156- // TODO(pavelkalinnikov): deprecate the cluster setting and call
157- // ScheduleGCFor unconditionally when min supported version is 23.2.
158- if cArgs .EvalCtx .ClusterSettings ().Version .IsActive (ctx , clusterversion .V23_2 ) ||
159- enableStickyGCHint .Get (& cArgs .EvalCtx .ClusterSettings ().SV ) {
160- // Add the timestamp to GCHint to guarantee that GC eventually clears it.
161- updated = hint .ScheduleGCFor (h .Timestamp )
162- }
144+ updated := hint .ScheduleGCFor (h .Timestamp )
163145 // If the range tombstone covers the whole Range key span, update the
164146 // corresponding timestamp in GCHint to enable ClearRange optimization.
165147 if args .Key .Equal (desc .StartKey .AsRawKey ()) && args .EndKey .Equal (desc .EndKey .AsRawKey ()) {
0 commit comments