@@ -114,13 +114,31 @@ var BatchPushedLockResolution = settings.RegisterBoolSetting(
114
114
true ,
115
115
)
116
116
117
- // UnreplicatedLockReliability controls whether the replica will attempt
118
- // to keep unreplicated locks during node operations such as split.
119
- var UnreplicatedLockReliability = settings .RegisterBoolSetting (
117
+ // UnreplicatedLockReliabilitySplit controls whether the replica will attempt
118
+ // to keep unreplicated locks during range split operations .
119
+ var UnreplicatedLockReliabilitySplit = settings .RegisterBoolSetting (
120
120
settings .SystemOnly ,
121
- "kv.lock_table.unreplicated_lock_reliability.enabled" ,
122
- "whether the replica should attempt to keep unreplicated locks during various node operations" ,
123
- metamorphic .ConstantWithTestBool ("kv.lock_table.unreplicated_lock_reliability.enabled" , true ),
121
+ "kv.lock_table.unreplicated_lock_reliability.split.enabled" ,
122
+ "whether the replica should attempt to keep unreplicated locks during range splits" ,
123
+ metamorphic .ConstantWithTestBool ("kv.lock_table.unreplicated_lock_reliability.split.enabled" , true ),
124
+ )
125
+
126
+ // UnreplicatedLockReliabilityLeaseTransfer controls whether the replica will attempt
127
+ // to keep unreplicated locks during lease transfer operations.
128
+ var UnreplicatedLockReliabilityLeaseTransfer = settings .RegisterBoolSetting (
129
+ settings .SystemOnly ,
130
+ "kv.lock_table.unreplicated_lock_reliability.lease_transfer.enabled" ,
131
+ "whether the replica should attempt to keep unreplicated locks during lease transfers" ,
132
+ metamorphic .ConstantWithTestBool ("kv.lock_table.unreplicated_lock_reliability.lease_transfer.enabled" , true ),
133
+ )
134
+
135
+ // UnreplicatedLockReliabilityMerge controls whether the replica will
136
+ // attempt to keep unreplicated locks during range merge operations.
137
+ var UnreplicatedLockReliabilityMerge = settings .RegisterBoolSetting (
138
+ settings .SystemOnly ,
139
+ "kv.lock_table.unreplicated_lock_reliability.merge.enabled" ,
140
+ "whether the replica should attempt to keep unreplicated locks during range merges" ,
141
+ metamorphic .ConstantWithTestBool ("kv.lock_table.unreplicated_lock_reliability.merge.enabled" , true ),
124
142
)
125
143
126
144
// managerImpl implements the Manager interface.
@@ -590,7 +608,7 @@ var allKeysSpan = roachpb.Span{Key: keys.MinKey, EndKey: keys.MaxKey}
590
608
591
609
// OnRangeLeaseTransferEval implements the RangeStateListener interface.
592
610
func (m * managerImpl ) OnRangeLeaseTransferEval () []* roachpb.LockAcquisition {
593
- if ! UnreplicatedLockReliability .Get (& m .st .SV ) {
611
+ if ! UnreplicatedLockReliabilityLeaseTransfer .Get (& m .st .SV ) {
594
612
return nil
595
613
}
596
614
@@ -606,7 +624,7 @@ func (m *managerImpl) OnRangeLeaseTransferEval() []*roachpb.LockAcquisition {
606
624
// during evalutation of Subsume. The returned LockAcquisition structs represent
607
625
// held locks that we may want to flush to disk as replicated.
608
626
func (m * managerImpl ) OnRangeSubsumeEval () []* roachpb.LockAcquisition {
609
- if ! UnreplicatedLockReliability .Get (& m .st .SV ) {
627
+ if ! UnreplicatedLockReliabilityMerge .Get (& m .st .SV ) {
610
628
return nil
611
629
}
612
630
@@ -636,7 +654,7 @@ func (m *managerImpl) OnRangeLeaseUpdated(seq roachpb.LeaseSequence, isLeasehold
636
654
// LHS replica of a split and should be passed the new RHS start key (LHS
637
655
// EndKey).
638
656
func (m * managerImpl ) OnRangeSplit (rhsStartKey roachpb.Key ) []roachpb.LockAcquisition {
639
- if UnreplicatedLockReliability .Get (& m .st .SV ) {
657
+ if UnreplicatedLockReliabilitySplit .Get (& m .st .SV ) {
640
658
lockToMove := m .lt .ClearGE (rhsStartKey )
641
659
m .twq .ClearGE (rhsStartKey )
642
660
return lockToMove
0 commit comments