-
Notifications
You must be signed in to change notification settings - Fork 181
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
Fix Proptest inflight_write invalidation after PutObject to same element #1222
base: main
Are you sure you want to change the base?
Conversation
1dfe711
to
04d5a73
Compare
04d5a73
to
2bf9c74
Compare
2bf9c74
to
fc69723
Compare
fc69723
to
beeede8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this quite represents what we want.
If the file has been created (mknod
) and opened for writing (open
), it should be possible to write to that file and upload the object even though it would then not be visible in the file system after. Moreover, the end state of the file system should mean that remotely in S3 we should see the file even though it will not be visible in Mountpoint.
We need to somehow tolerate the open returning ESTALE
- maybe we can discuss in-person how feasible that might be.
@@ -47,6 +47,7 @@ time = { version = "0.3.37", features = ["macros", "formatting"] } | |||
tracing = { version = "0.1.41", features = ["log"] } | |||
tracing-log = "0.2.0" | |||
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] } | |||
log = "0.4.22" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't need this
Adds a failing proptest, which occured as we did not remove inflight writes to a file, if it was overriden by a PutObject. Fixes this by invalidating such writes. Signed-off-by: Christian Hagemeier <[email protected]>
beeede8
to
b654a0d
Compare
Adds a failing proptest, and a potential fix for it. The root cause seems to have been that if after a file has been opened, and then modified by i.e., a remote PutObject, the old ino is stale, but will be opened in the inflight-write regardless.
This code change fixes this issue by removing such a inflight write. For reviewers:
invalidate
method to invalidate based on a PathBuf)?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).