mirror of
https://github.com/rustfs/rustfs.git
synced 2026-09-03 18:55:39 +00:00
test(ecstore): satisfy multipart barrier lint
This commit is contained in:
@@ -137,10 +137,11 @@ async fn pause_multipart_commit(bucket: &str, object: &str, pause: MultipartComm
|
|||||||
.as_ref()
|
.as_ref()
|
||||||
.filter(|barrier| barrier.bucket == bucket && barrier.object == object && barrier.pause == pause)
|
.filter(|barrier| barrier.bucket == bucket && barrier.object == object && barrier.pause == pause)
|
||||||
.cloned();
|
.cloned();
|
||||||
if let Some(barrier) = barrier {
|
if let Some(barrier) = barrier
|
||||||
if let Ok(previous) = barrier.arrivals.fetch_update(Ordering::AcqRel, Ordering::Acquire, |current| {
|
&& let Ok(previous) = barrier.arrivals.fetch_update(Ordering::AcqRel, Ordering::Acquire, |current| {
|
||||||
(current < barrier.expected_arrivals).then_some(current + 1)
|
(current < barrier.expected_arrivals).then_some(current + 1)
|
||||||
}) {
|
})
|
||||||
|
{
|
||||||
let arrival = previous + 1;
|
let arrival = previous + 1;
|
||||||
if arrival == barrier.expected_arrivals {
|
if arrival == barrier.expected_arrivals {
|
||||||
barrier.arrived.notify_one();
|
barrier.arrived.notify_one();
|
||||||
@@ -153,7 +154,6 @@ async fn pause_multipart_commit(bucket: &str, object: &str, pause: MultipartComm
|
|||||||
.forget();
|
.forget();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fn map_upload_id_metadata_error(bucket: &str, object: &str, upload_id: &str, err: DiskError) -> Error {
|
fn map_upload_id_metadata_error(bucket: &str, object: &str, upload_id: &str, err: DiskError) -> Error {
|
||||||
if err == DiskError::FileNotFound {
|
if err == DiskError::FileNotFound {
|
||||||
|
|||||||
Reference in New Issue
Block a user