mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-30 16:59:52 +00:00
Improve lock (#596)
* improve lock Signed-off-by: Mu junxiang <1948535941@qq.com> * feat(tests): add wait_for_object_absence helper and improve lifecycle test reliability Signed-off-by: Mu junxiang <1948535941@qq.com> * chore: remove dirty docs Signed-off-by: Mu junxiang <1948535941@qq.com> --------- Signed-off-by: Mu junxiang <1948535941@qq.com>
This commit is contained in:
@@ -98,12 +98,18 @@ impl DisabledLockManager {
|
||||
|
||||
/// Always succeeds - all locks acquired
|
||||
pub async fn acquire_locks_batch(&self, batch_request: BatchLockRequest) -> BatchLockResult {
|
||||
let successful_locks: Vec<ObjectKey> = batch_request.requests.into_iter().map(|req| req.key).collect();
|
||||
let successful_locks: Vec<ObjectKey> = batch_request.requests.iter().map(|req| req.key.clone()).collect();
|
||||
let guards = batch_request
|
||||
.requests
|
||||
.into_iter()
|
||||
.map(|req| FastLockGuard::new_disabled(req.key, req.mode, req.owner))
|
||||
.collect();
|
||||
|
||||
BatchLockResult {
|
||||
successful_locks,
|
||||
failed_locks: Vec::new(),
|
||||
all_acquired: true,
|
||||
guards,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user