juicedata / juicefs

JuiceFS is a distributed POSIX file system built on top of Redis and S3.
https://juicefs.com
Apache License 2.0
10.06k stars 888 forks source link

Flush staging files on close as much as possible #4965

Open polyrabbit opened 1 week ago

polyrabbit commented 1 week ago

Flush staging files as much as possible, making writeback safer to turn on.

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 40.00000% with 15 lines in your changes missing coverage. Please review.

Project coverage is 45.18%. Comparing base (a8cb0fc) to head (1783770). Report is 7 commits behind head on main.

:exclamation: Current head 1783770 differs from pull request most recent head 3ae32ef

Please upload reports for the commit 3ae32ef to get more accurate results.

Files Patch % Lines
pkg/chunk/cached_store.go 37.50% 15 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #4965 +/- ## =========================================== + Coverage 24.97% 45.18% +20.21% =========================================== Files 25 159 +134 Lines 16045 43185 +27140 =========================================== + Hits 4007 19515 +15508 - Misses 11549 21307 +9758 - Partials 489 2363 +1874 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jiefenghuang commented 1 day ago

I think this is not an essential requirement for all writeback scenarios It would be more appropriate to place it in a separate command as a tool.