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

Enable ETAG based validation on every block download to provide higher consistency #1608

Open
wants to merge 25 commits into
base: blobfuse/2.4.1
Choose a base branch
from

Conversation

vibhansa-msft
Copy link
Member

@vibhansa-msft vibhansa-msft commented Jan 15, 2025

✅ What

In block-cache mode, every download is not validated for higher consistency. If a file is open or half-read and contents are modified on the container, subsequent reads will start fetching new content and provide inconsistent data to application. Adding an ETAG based validation will guard applications against such data corruption. When an 'open' file call comes ETAG from blob will be preserved by block-cache. Any subsequent block download will revalidate that ETAG is still the same. If ETAG has changed, then it means blob was modified on container after open and in such case download and read operation will fail.

🤔 Why

This will safeguard application from data corruption where blob is modified on container through other means.

👩‍🔬 How to validate if applicable

Open a file and then modify the file on container followed by a read operation on mounted path.

🔖 Related links

NA

@ashruti-msft
Copy link
Collaborator

Later we should run some perf tests with data consistency on to inform users what % diff in performance, memory usage they can expect with this option on and off.

component/azstorage/block_blob.go Outdated Show resolved Hide resolved
component/azstorage/block_blob.go Show resolved Hide resolved
component/azstorage/block_blob.go Show resolved Hide resolved
component/block_cache/block_cache.go Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
opt.Range = blob.HTTPRange{
Offset: offset,
Count: len,
if etag != nil {
Copy link
Member

Choose a reason for hiding this comment

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

No need to check the nil value as we are passing the pointer to a zerovalue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants