@@ -1534,9 +1534,9 @@ func TestGetIntent(t *testing.T) {
1534
1534
// Key "b" has an intent, an exclusive lock, and a shared lock from txn1.
1535
1535
// NOTE: acquire in increasing strength order so that acquisition is never
1536
1536
// skipped.
1537
- err = MVCCAcquireLock (ctx , eng , & txn1 .TxnMeta , txn1 .IgnoredSeqNums , lock .Shared , keyB , nil , 0 , 0 )
1537
+ err = MVCCAcquireLock (ctx , eng , & txn1 .TxnMeta , txn1 .IgnoredSeqNums , lock .Shared , keyB , nil , 0 , 0 , false )
1538
1538
require .NoError (t , err )
1539
- err = MVCCAcquireLock (ctx , eng , & txn1 .TxnMeta , txn1 .IgnoredSeqNums , lock .Exclusive , keyB , nil , 0 , 0 )
1539
+ err = MVCCAcquireLock (ctx , eng , & txn1 .TxnMeta , txn1 .IgnoredSeqNums , lock .Exclusive , keyB , nil , 0 , 0 , false )
1540
1540
require .NoError (t , err )
1541
1541
_ , err = MVCCPut (ctx , eng , keyB , txn1 .ReadTimestamp , val , MVCCWriteOptions {Txn : txn1 })
1542
1542
require .NoError (t , err )
@@ -1546,15 +1546,15 @@ func TestGetIntent(t *testing.T) {
1546
1546
require .NoError (t , err )
1547
1547
1548
1548
// Key "d" has an exclusive lock and a shared lock from txn2.
1549
- err = MVCCAcquireLock (ctx , eng , & txn2 .TxnMeta , txn2 .IgnoredSeqNums , lock .Shared , keyD , nil , 0 , 0 )
1549
+ err = MVCCAcquireLock (ctx , eng , & txn2 .TxnMeta , txn2 .IgnoredSeqNums , lock .Shared , keyD , nil , 0 , 0 , false )
1550
1550
require .NoError (t , err )
1551
- err = MVCCAcquireLock (ctx , eng , & txn2 .TxnMeta , txn2 .IgnoredSeqNums , lock .Exclusive , keyD , nil , 0 , 0 )
1551
+ err = MVCCAcquireLock (ctx , eng , & txn2 .TxnMeta , txn2 .IgnoredSeqNums , lock .Exclusive , keyD , nil , 0 , 0 , false )
1552
1552
require .NoError (t , err )
1553
1553
1554
1554
// Key "e" has a shared lock from each txn.
1555
- err = MVCCAcquireLock (ctx , eng , & txn1 .TxnMeta , txn1 .IgnoredSeqNums , lock .Shared , keyE , nil , 0 , 0 )
1555
+ err = MVCCAcquireLock (ctx , eng , & txn1 .TxnMeta , txn1 .IgnoredSeqNums , lock .Shared , keyE , nil , 0 , 0 , false )
1556
1556
require .NoError (t , err )
1557
- err = MVCCAcquireLock (ctx , eng , & txn2 .TxnMeta , txn2 .IgnoredSeqNums , lock .Shared , keyE , nil , 0 , 0 )
1557
+ err = MVCCAcquireLock (ctx , eng , & txn2 .TxnMeta , txn2 .IgnoredSeqNums , lock .Shared , keyE , nil , 0 , 0 , false )
1558
1558
require .NoError (t , err )
1559
1559
1560
1560
// Key "f" has no intent/locks.
@@ -1642,7 +1642,7 @@ func TestScanLocks(t *testing.T) {
1642
1642
if str == lock .Intent {
1643
1643
_ , err = MVCCPut (ctx , eng , roachpb .Key (k ), txn1 .ReadTimestamp , roachpb .MakeValueFromBytes (roachpb .Key (k )), MVCCWriteOptions {Txn : txn1 })
1644
1644
} else {
1645
- err = MVCCAcquireLock (ctx , eng , & txn1 .TxnMeta , txn1 .IgnoredSeqNums , str , roachpb .Key (k ), nil , 0 , 0 )
1645
+ err = MVCCAcquireLock (ctx , eng , & txn1 .TxnMeta , txn1 .IgnoredSeqNums , str , roachpb .Key (k ), nil , 0 , 0 , false )
1646
1646
}
1647
1647
require .NoError (t , err )
1648
1648
}
@@ -2211,11 +2211,11 @@ func TestScanConflictingIntentsForDroppingLatchesEarly(t *testing.T) {
2211
2211
setup : func (t * testing.T , rw ReadWriter , _ * roachpb.Transaction ) {
2212
2212
txnA := newTxn (belowTxnTS )
2213
2213
txnB := newTxn (belowTxnTS )
2214
- err := MVCCAcquireLock (ctx , rw , & txnA .TxnMeta , txnA .IgnoredSeqNums , lock .Shared , keyA , nil /*ms*/ , 0 /*maxConflicts*/ , 0 /*targetLockConflictBytes*/ )
2214
+ err := MVCCAcquireLock (ctx , rw , & txnA .TxnMeta , txnA .IgnoredSeqNums , lock .Shared , keyA , nil /*ms*/ , 0 /*maxConflicts*/ , 0 /*targetLockConflictBytes*/ , false )
2215
2215
require .NoError (t , err )
2216
- err = MVCCAcquireLock (ctx , rw , & txnB .TxnMeta , txnB .IgnoredSeqNums , lock .Shared , keyA , nil /*ms*/ , 0 /*maxConflicts*/ , 0 /*targetLockConflictBytes*/ )
2216
+ err = MVCCAcquireLock (ctx , rw , & txnB .TxnMeta , txnB .IgnoredSeqNums , lock .Shared , keyA , nil /*ms*/ , 0 /*maxConflicts*/ , 0 /*targetLockConflictBytes*/ , false )
2217
2217
require .NoError (t , err )
2218
- err = MVCCAcquireLock (ctx , rw , & txnA .TxnMeta , txnA .IgnoredSeqNums , lock .Exclusive , keyB , nil /*ms*/ , 0 /*maxConflicts*/ , 0 /*targetLockConflictBytes*/ )
2218
+ err = MVCCAcquireLock (ctx , rw , & txnA .TxnMeta , txnA .IgnoredSeqNums , lock .Exclusive , keyB , nil /*ms*/ , 0 /*maxConflicts*/ , 0 /*targetLockConflictBytes*/ , false )
2219
2219
require .NoError (t , err )
2220
2220
},
2221
2221
start : keyA ,
@@ -2229,9 +2229,9 @@ func TestScanConflictingIntentsForDroppingLatchesEarly(t *testing.T) {
2229
2229
name : "shared and exclusive locks should be ignored no end key" ,
2230
2230
setup : func (t * testing.T , rw ReadWriter , _ * roachpb.Transaction ) {
2231
2231
txnA := newTxn (belowTxnTS )
2232
- err := MVCCAcquireLock (ctx , rw , & txnA .TxnMeta , txnA .IgnoredSeqNums , lock .Shared , keyA , nil /*ms*/ , 0 /*maxConflicts*/ , 0 /*targetLockConflictBytes*/ )
2232
+ err := MVCCAcquireLock (ctx , rw , & txnA .TxnMeta , txnA .IgnoredSeqNums , lock .Shared , keyA , nil /*ms*/ , 0 /*maxConflicts*/ , 0 /*targetLockConflictBytes*/ , false )
2233
2233
require .NoError (t , err )
2234
- err = MVCCAcquireLock (ctx , rw , & txnA .TxnMeta , txnA .IgnoredSeqNums , lock .Exclusive , keyA , nil /*ms*/ , 0 /*maxConflicts*/ , 0 /*targetLockConflictBytes*/ )
2234
+ err = MVCCAcquireLock (ctx , rw , & txnA .TxnMeta , txnA .IgnoredSeqNums , lock .Exclusive , keyA , nil /*ms*/ , 0 /*maxConflicts*/ , 0 /*targetLockConflictBytes*/ , false )
2235
2235
require .NoError (t , err )
2236
2236
},
2237
2237
start : keyA ,
@@ -2244,11 +2244,11 @@ func TestScanConflictingIntentsForDroppingLatchesEarly(t *testing.T) {
2244
2244
setup : func (t * testing.T , rw ReadWriter , _ * roachpb.Transaction ) {
2245
2245
txnA := newTxn (belowTxnTS )
2246
2246
txnB := newTxn (belowTxnTS )
2247
- err := MVCCAcquireLock (ctx , rw , & txnA .TxnMeta , txnA .IgnoredSeqNums , lock .Shared , keyA , nil /*ms*/ , 0 /*maxConflicts*/ , 0 /*targetLockConflictBytes*/ )
2247
+ err := MVCCAcquireLock (ctx , rw , & txnA .TxnMeta , txnA .IgnoredSeqNums , lock .Shared , keyA , nil /*ms*/ , 0 /*maxConflicts*/ , 0 /*targetLockConflictBytes*/ , false )
2248
2248
require .NoError (t , err )
2249
- err = MVCCAcquireLock (ctx , rw , & txnB .TxnMeta , txnB .IgnoredSeqNums , lock .Shared , keyA , nil /*ms*/ , 0 /*maxConflicts*/ , 0 /*targetLockConflictBytes*/ )
2249
+ err = MVCCAcquireLock (ctx , rw , & txnB .TxnMeta , txnB .IgnoredSeqNums , lock .Shared , keyA , nil /*ms*/ , 0 /*maxConflicts*/ , 0 /*targetLockConflictBytes*/ , false )
2250
2250
require .NoError (t , err )
2251
- err = MVCCAcquireLock (ctx , rw , & txnA .TxnMeta , txnA .IgnoredSeqNums , lock .Exclusive , keyB , nil /*ms*/ , 0 /*maxConflicts*/ , 0 /*targetLockConflictBytes*/ )
2251
+ err = MVCCAcquireLock (ctx , rw , & txnA .TxnMeta , txnA .IgnoredSeqNums , lock .Exclusive , keyB , nil /*ms*/ , 0 /*maxConflicts*/ , 0 /*targetLockConflictBytes*/ , false )
2252
2252
require .NoError (t , err )
2253
2253
require .NoError (t , err )
2254
2254
_ , err = MVCCPut (ctx , rw , keyC , txnA .WriteTimestamp , val , MVCCWriteOptions {Txn : txnA })
@@ -2264,11 +2264,11 @@ func TestScanConflictingIntentsForDroppingLatchesEarly(t *testing.T) {
2264
2264
setup : func (t * testing.T , rw ReadWriter , txn * roachpb.Transaction ) {
2265
2265
txnA := newTxn (belowTxnTS )
2266
2266
txnB := newTxn (belowTxnTS )
2267
- err := MVCCAcquireLock (ctx , rw , & txnA .TxnMeta , txnA .IgnoredSeqNums , lock .Shared , keyA , nil /*ms*/ , 0 /*maxConflicts*/ , 0 /*targetLockConflictBytes*/ )
2267
+ err := MVCCAcquireLock (ctx , rw , & txnA .TxnMeta , txnA .IgnoredSeqNums , lock .Shared , keyA , nil /*ms*/ , 0 /*maxConflicts*/ , 0 /*targetLockConflictBytes*/ , false )
2268
2268
require .NoError (t , err )
2269
- err = MVCCAcquireLock (ctx , rw , & txnB .TxnMeta , txnB .IgnoredSeqNums , lock .Shared , keyA , nil /*ms*/ , 0 /*maxConflicts*/ , 0 /*targetLockConflictBytes*/ )
2269
+ err = MVCCAcquireLock (ctx , rw , & txnB .TxnMeta , txnB .IgnoredSeqNums , lock .Shared , keyA , nil /*ms*/ , 0 /*maxConflicts*/ , 0 /*targetLockConflictBytes*/ , false )
2270
2270
require .NoError (t , err )
2271
- err = MVCCAcquireLock (ctx , rw , & txnA .TxnMeta , txnA .IgnoredSeqNums , lock .Exclusive , keyB , nil /*ms*/ , 0 /*maxConflicts*/ , 0 /*targetLockConflictBytes*/ )
2271
+ err = MVCCAcquireLock (ctx , rw , & txnA .TxnMeta , txnA .IgnoredSeqNums , lock .Exclusive , keyB , nil /*ms*/ , 0 /*maxConflicts*/ , 0 /*targetLockConflictBytes*/ , false )
2272
2272
require .NoError (t , err )
2273
2273
_ , err = MVCCPut (ctx , rw , keyC , txn .WriteTimestamp , val , MVCCWriteOptions {Txn : txn })
2274
2274
require .NoError (t , err )
0 commit comments