-
Notifications
You must be signed in to change notification settings - Fork 997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Writeback cache synchronization issue #3143
Comments
|
I can also observe the behavior of |
That's weird, the snippet I linked above should be the only place that uploads objects in advance. Could you describe the problem you met in more detail? |
@SandyXSD, I've tested your dedup-uploads branch in the scenario that was causing me the original issue reported above. This change does appear to resolve the problem in this test case, thank you! I'm not sure if related to the change made or if due to me switching from v1.0.3 to this main-based branch, but I believe I am also now seeing upload-delay being respected. |
Thanks for the feedback. Again if the cache-dir is too full (by default |
Reopen this issue because there's more details need to be confirmed. |
Another thing to mention is that the issue "block is still being uploaded after the file is deleted" is not fixed for the following reasons:
|
About 3rd point, can't this be fixed in a condition if only one mount is detected? |
Adding a context with cancel should be workable for a single mount. Though the ongoing PUT request can't be cancelled, later retried ones can be avoided. However, as 1 & 2 state, this is an issue with low priority. |
Thanks, as i'm using JuiceFS with a single client, this should help here! |
What happened:
JuiceFS appears to have a writeback cache synchronization issue. Example below may be exacerbated by slow IO and intolerance for misbehavior of the storage provider (STORJ), but it seems to me that the root cause is within JuiceFS.
See chunk 11008_0_4194304 in attached log; several parallel upload attempts (resulting in server errors), continuing to try to upload after file has been deleted (at time 21:32:04), and other general signs of missing synchronization. Also appears (not observable in log below) as though --upload-delay is not being fully obeyed (uploads begin within about one second of file creation). This example is very repeatable. This problem does not occur without --writeback in the mount command.
What you expected to happen:
One concurrent upload attempt per chunk, and no attempt to continue uploading significantly after chunk has been deleted locally.
How to reproduce it (as minimally and precisely as possible):
Mount command: juicefs mount --no-usage-report --cache-size 512 --writeback -o allow_other --upload-delay 5 --backup-meta 0 --max-uploads 5 --verbose sqlite3://storj-test.db /jfs
Test scenario: create 10 4MB files in rapid succession:
for i in {1..10}; do dd if=/dev/urandom bs=1M count=4 of=./test${i}; done
Environment:
Log:
See juicefs-storj-writeback-issue.log. Reflects that I have placed additional DEBUG statements just before and after s3.go:Put()'s call to s3.PutObject() to help clarify the misbehavior. Redacted my IP with <MY_IP>, juicefs cache path with <JFS_CACHE>
The text was updated successfully, but these errors were encountered: