Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

c-hagem
Copy link
Contributor

@c-hagem c-hagem commented Jan 13, 2025

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:

  • Maybe this code should go into inflight_writes (i.e. add a 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).

@c-hagem c-hagem requested a deployment to PR integration tests January 13, 2025 10:35 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 13, 2025 10:35 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 13, 2025 10:35 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 13, 2025 10:35 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 13, 2025 10:35 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 13, 2025 10:35 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 13, 2025 10:35 — with GitHub Actions Waiting
@c-hagem c-hagem changed the title Add failing proptest (most likely reference bug) Add failing reftest (most likely reference bug) Jan 13, 2025
@c-hagem c-hagem force-pushed the reftest-staleness-failure branch from 1dfe711 to 04d5a73 Compare January 15, 2025 09:55
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 09:55 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 09:55 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 09:55 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 09:55 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 09:55 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 09:55 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 09:55 — with GitHub Actions Waiting
@c-hagem c-hagem force-pushed the reftest-staleness-failure branch from 04d5a73 to 2bf9c74 Compare January 15, 2025 09:56
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 09:56 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 09:57 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 09:57 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 09:57 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 09:57 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 09:57 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 09:57 — with GitHub Actions Waiting
@c-hagem c-hagem changed the title Add failing reftest (most likely reference bug) Fix Proptest inflight_write invalidation after PutObject to same element Jan 15, 2025
@c-hagem c-hagem force-pushed the reftest-staleness-failure branch from 2bf9c74 to fc69723 Compare January 15, 2025 12:08
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 12:08 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 12:08 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 12:08 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 12:08 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 12:08 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 12:08 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 12:08 — with GitHub Actions Waiting
@c-hagem c-hagem force-pushed the reftest-staleness-failure branch from fc69723 to beeede8 Compare January 15, 2025 12:21
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 12:22 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 12:22 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 12:22 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 12:22 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 12:22 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 12:22 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 12:22 — with GitHub Actions Waiting
Copy link
Contributor

@dannycjones dannycjones left a 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"
Copy link
Contributor

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]>
@c-hagem c-hagem force-pushed the reftest-staleness-failure branch from beeede8 to b654a0d Compare January 15, 2025 13:59
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 13:59 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 13:59 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 13:59 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 13:59 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 13:59 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 13:59 — with GitHub Actions Waiting
@c-hagem c-hagem requested a deployment to PR integration tests January 15, 2025 13:59 — with GitHub Actions Waiting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants