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

Implement CacheConfig field permitting some operations to return non-expired cache data #547

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

dannycjones
Copy link
Contributor

@dannycjones dannycjones commented Oct 9, 2023

Description of change

This plumbs in checks for if the filesystem should check with S3 to ensure we're consistent with S3 at open, create, etc.

There is no way to configure mountpoint-s3 itself to relax the consistency model - this change only impacts internals.

Relevant issues: #255

Does this change impact existing behavior?

If the new field is set to false, it does impact the consistency model of the mountpoint-s3::fs::S3Filesystem. This is not configurable during mounting at this time, but may be in the future.


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).

@dannycjones dannycjones temporarily deployed to PR integration tests October 9, 2023 15:19 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 9, 2023 15:19 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 9, 2023 17:24 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 9, 2023 17:24 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 10, 2023 09:21 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 10, 2023 09:21 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 10, 2023 11:14 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 10, 2023 11:14 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 11, 2023 11:01 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 11, 2023 11:01 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 11, 2023 11:01 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 11, 2023 13:58 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 11, 2023 13:58 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 11, 2023 13:58 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 11, 2023 14:05 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 11, 2023 14:05 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 11, 2023 14:05 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 11, 2023 14:39 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 11, 2023 14:39 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 11, 2023 14:39 — with GitHub Actions Inactive
@dannycjones dannycjones marked this pull request as ready for review October 11, 2023 14:45
Copy link
Contributor

@passaro passaro left a comment

Choose a reason for hiding this comment

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

Looks good. Mostly minor comments here and there.

Only slight concern is that we need to check the new cache config flag in quite a few different places. It seems to me that lookup_by_name could almost be the central place where we check it, if not for one case (when called by getattr on open).
Not critical, but it could interesting to explore alternatives where the flag is only used in a single layer: e.g. move the getattr code to a new SuperblockInner::lookup_by_ino method, which would also check the flag (to ignore force_revalidate) and then try the remote lookup.

mountpoint-s3/src/fs.rs Outdated Show resolved Hide resolved
mountpoint-s3/src/inode.rs Outdated Show resolved Hide resolved
mountpoint-s3/src/inode.rs Outdated Show resolved Hide resolved
This plumbs in checks for if the filesystem should maintain strong consistency for operations like open.
There is no way to configure mountpoint-s3 itself to relax the consistency model - this change only impacts internals.

Signed-off-by: Daniel Carl Jones <djonesoa@amazon.com>
@dannycjones dannycjones temporarily deployed to PR integration tests October 12, 2023 14:28 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 12, 2023 14:28 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 12, 2023 14:28 — with GitHub Actions Inactive
Copy link
Contributor

@passaro passaro left a comment

Choose a reason for hiding this comment

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

Looks good. Feel free to ignore the one tiny nit.

mountpoint-s3/src/inode.rs Show resolved Hide resolved
@dannycjones dannycjones temporarily deployed to PR integration tests October 16, 2023 17:17 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 16, 2023 17:17 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 16, 2023 17:17 — with GitHub Actions Inactive
@dannycjones dannycjones temporarily deployed to PR integration tests October 16, 2023 17:17 — with GitHub Actions Inactive
@dannycjones dannycjones added this pull request to the merge queue Oct 17, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 17, 2023
@dannycjones dannycjones added this pull request to the merge queue Oct 17, 2023
Merged via the queue into awslabs:main with commit a50f1ca Oct 17, 2023
18 checks passed
@dannycjones dannycjones deleted the metadata-cache branch October 17, 2023 16:00
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.

None yet

2 participants