@@ -295,7 +295,12 @@ impl RedisPool {
295
295
296
296
fetch_ids. iter ( ) . for_each ( |key| {
297
297
pipe. atomic ( ) . set_options (
298
- format ! ( "{}_{namespace}:{}/lock" , self . meta_namespace, key) ,
298
+ // We store locks in lowercase because they are case insensitive
299
+ format ! (
300
+ "{}_{namespace}:{}/lock" ,
301
+ self . meta_namespace,
302
+ key. to_lowercase( )
303
+ ) ,
299
304
100 ,
300
305
SetOptions :: default ( )
301
306
. get ( true )
@@ -395,7 +400,9 @@ impl RedisPool {
395
400
396
401
pipe. atomic ( ) . del ( format ! (
397
402
"{}_{namespace}:{}/lock" ,
398
- self . meta_namespace, actual_slug
403
+ // Locks are stored in lowercase
404
+ self . meta_namespace,
405
+ actual_slug. to_lowercase( )
399
406
) ) ;
400
407
}
401
408
}
@@ -408,8 +415,10 @@ impl RedisPool {
408
415
ids. remove ( & base62) ;
409
416
410
417
pipe. atomic ( ) . del ( format ! (
411
- "{}_{namespace}:{base62}/lock" ,
412
- self . meta_namespace
418
+ "{}_{namespace}:{}/lock" ,
419
+ self . meta_namespace,
420
+ // Locks are stored in lowercase
421
+ base62. to_lowercase( )
413
422
) ) ;
414
423
}
415
424
@@ -451,7 +460,8 @@ impl RedisPool {
451
460
format ! (
452
461
"{}_{namespace}:{}/lock" ,
453
462
self . meta_namespace,
454
- x. key( )
463
+ // We lowercase key because locks are stored in lowercase
464
+ x. key( ) . to_lowercase( )
455
465
)
456
466
} )
457
467
. collect :: < Vec < _ > > ( ) ,
0 commit comments