@@ -94,7 +94,7 @@ async fn txn_cleanup_locks_batch_size() -> Result<()> {
94
94
95
95
init ( ) . await ?;
96
96
let scenario = FailScenario :: setup ( ) ;
97
- let full_range = vec ! [ ] ..;
97
+ let full_range = ..;
98
98
99
99
fail:: cfg ( "after-prewrite" , "return" ) . unwrap ( ) ;
100
100
fail:: cfg ( "before-cleanup-locks" , "return" ) . unwrap ( ) ;
@@ -113,10 +113,10 @@ async fn txn_cleanup_locks_batch_size() -> Result<()> {
113
113
batch_size : 4 ,
114
114
} ;
115
115
let res = client
116
- . cleanup_locks ( & safepoint , full_range , options)
116
+ . cleanup_locks ( full_range , & safepoint , options)
117
117
. await ?;
118
118
119
- assert_eq ! ( res. meet_locks , keys. len( ) ) ;
119
+ assert_eq ! ( res. resolved_locks , keys. len( ) ) ;
120
120
assert_eq ! ( count_locks( & client) . await ?, keys. len( ) ) ;
121
121
122
122
scenario. teardown ( ) ;
@@ -130,7 +130,7 @@ async fn txn_cleanup_async_commit_locks() -> Result<()> {
130
130
131
131
init ( ) . await ?;
132
132
let scenario = FailScenario :: setup ( ) ;
133
- let full_range = vec ! [ ] ..;
133
+ let full_range = ..;
134
134
135
135
// no commit
136
136
{
@@ -150,7 +150,7 @@ async fn txn_cleanup_async_commit_locks() -> Result<()> {
150
150
..Default :: default ( )
151
151
} ;
152
152
client
153
- . cleanup_locks ( & safepoint , full_range . clone ( ) , options)
153
+ . cleanup_locks ( full_range , & safepoint , options)
154
154
. await ?;
155
155
156
156
must_committed ( & client, keys) . await ;
@@ -177,7 +177,7 @@ async fn txn_cleanup_async_commit_locks() -> Result<()> {
177
177
..Default :: default ( )
178
178
} ;
179
179
client
180
- . cleanup_locks ( & safepoint , full_range . clone ( ) , options)
180
+ . cleanup_locks ( full_range , & safepoint , options)
181
181
. await ?;
182
182
183
183
must_committed ( & client, keys) . await ;
@@ -196,7 +196,7 @@ async fn txn_cleanup_async_commit_locks() -> Result<()> {
196
196
..Default :: default ( )
197
197
} ;
198
198
client
199
- . cleanup_locks ( & safepoint , full_range , options)
199
+ . cleanup_locks ( full_range , & safepoint , options)
200
200
. await ?;
201
201
202
202
must_committed ( & client, keys) . await ;
@@ -240,17 +240,17 @@ async fn txn_cleanup_range_async_commit_locks() -> Result<()> {
240
240
..Default :: default ( )
241
241
} ;
242
242
let res = client
243
- . cleanup_locks ( & safepoint , start_key..end_key, options)
243
+ . cleanup_locks ( start_key..end_key, & safepoint , options)
244
244
. await ?;
245
245
246
- assert_eq ! ( res. meet_locks , keys. len( ) - 3 ) ;
246
+ assert_eq ! ( res. resolved_locks , keys. len( ) - 3 ) ;
247
247
248
248
// cleanup all locks to avoid affecting following cases.
249
249
let options = ResolveLocksOptions {
250
250
async_commit_only : false ,
251
251
..Default :: default ( )
252
252
} ;
253
- client. cleanup_locks ( & safepoint , vec ! [ ] .. , options) . await ?;
253
+ client. cleanup_locks ( .. , & safepoint , options) . await ?;
254
254
must_committed ( & client, keys) . await ;
255
255
assert_eq ! ( count_locks( & client) . await ?, 0 ) ;
256
256
@@ -265,7 +265,7 @@ async fn txn_cleanup_2pc_locks() -> Result<()> {
265
265
266
266
init ( ) . await ?;
267
267
let scenario = FailScenario :: setup ( ) ;
268
- let full_range = vec ! [ ] ..;
268
+ let full_range = ..;
269
269
270
270
// no commit
271
271
{
@@ -286,7 +286,7 @@ async fn txn_cleanup_2pc_locks() -> Result<()> {
286
286
..Default :: default ( )
287
287
} ;
288
288
client
289
- . cleanup_locks ( & safepoint , full_range . clone ( ) , options)
289
+ . cleanup_locks ( full_range , & safepoint , options)
290
290
. await ?;
291
291
assert_eq ! ( count_locks( & client) . await ?, keys. len( ) ) ;
292
292
}
@@ -295,7 +295,7 @@ async fn txn_cleanup_2pc_locks() -> Result<()> {
295
295
..Default :: default ( )
296
296
} ;
297
297
client
298
- . cleanup_locks ( & safepoint , full_range . clone ( ) , options)
298
+ . cleanup_locks ( full_range , & safepoint , options)
299
299
. await ?;
300
300
301
301
must_rollbacked ( & client, keys) . await ;
@@ -315,7 +315,7 @@ async fn txn_cleanup_2pc_locks() -> Result<()> {
315
315
..Default :: default ( )
316
316
} ;
317
317
client
318
- . cleanup_locks ( & safepoint , full_range , options)
318
+ . cleanup_locks ( full_range , & safepoint , options)
319
319
. await ?;
320
320
321
321
must_committed ( & client, keys) . await ;
0 commit comments