Skip to content

Commit

Permalink
Avoid joining the fuse background thread when dropping test sessions (#…
Browse files Browse the repository at this point in the history
…1124)

## Description of change

The change #1116 fixed the order in which the file system was unmounted
and the temporary mount directory was removed. In order to unmount, we
added a call to `join()` on the FUSE session, which also waits for its
background thread to join and can occasionally fail with a
`ECONNABORTED` (ConnectionAborted, "Software caused connection abort")
error.
This change addresses the issue by only dropping the FUSE session,
without waiting for the thread to terminate.

## Does this change impact existing behavior?

No. Only affects tests.

## Does this change need a changelog entry in any of the crates?

No. Only affects tests.

---

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and I agree to the terms of
the [Developer Certificate of Origin
(DCO)](https://developercertificate.org/).

Signed-off-by: Alessandro Passaro <[email protected]>
  • Loading branch information
passaro authored Nov 11, 2024
1 parent e544f8f commit 822712c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mountpoint-s3/tests/common/fuse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ impl TestSession {

impl Drop for TestSession {
fn drop(&mut self) {
// Explicitly unmount so we know the background thread is gone
self.session.take().unwrap().join();
// Unmount first by dropping the background session
self.session.take();
}
}

Expand Down

1 comment on commit 822712c

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Throughput Benchmark (S3 Standard)'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 822712c Previous: e544f8f Ratio
random_read 2.9822265625 MiB/s 6.5650390625 MiB/s 2.20

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.