mirror of
https://github.com/rustfs/rustfs.git
synced 2026-09-06 20:19:14 +00:00
fix(ecstore): capture complete fsync worker guard
(cherry picked from commit 1dc90bb836e20ea9ee45d0a629a9201e20d231c4)
This commit is contained in:
@@ -13459,6 +13459,7 @@ mod test {
|
||||
let fence = disk
|
||||
.snapshot_leases
|
||||
.lock()
|
||||
.await
|
||||
.entries
|
||||
.get(&SnapshotLeaseKey {
|
||||
volume: RUSTFS_META_BUCKET.to_string(),
|
||||
|
||||
@@ -826,12 +826,13 @@ impl Drop for DstDirFsyncWorkerGuard {
|
||||
|
||||
fn run_dst_dir_fsync_group_worker(group: Arc<DstDirFsyncGroup>) -> impl std::future::Future<Output = ()> {
|
||||
// Capture before spawning: shutdown may drop the future without polling it.
|
||||
let mut worker_guard = DstDirFsyncWorkerGuard {
|
||||
let worker_guard = DstDirFsyncWorkerGuard {
|
||||
group: group.clone(),
|
||||
in_flight: 0,
|
||||
armed: true,
|
||||
};
|
||||
async move {
|
||||
let mut worker_guard = worker_guard;
|
||||
loop {
|
||||
#[cfg(test)]
|
||||
fsync_dir_recorder::run_before_group_batch(&group.dir);
|
||||
|
||||
Reference in New Issue
Block a user