-
Notifications
You must be signed in to change notification settings - Fork 76
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
block_store_fs enhanced to use xattrs and migrate blocks to tier2 #7283
Conversation
854b819
to
648c8cf
Compare
Signed-off-by: Guy Margalit <guymguym@gmail.com>
Signed-off-by: Guy Margalit <guymguym@gmail.com>
} | ||
|
||
try { | ||
await nb_native().fs.writeFile(fs_context, block_path, data, { |
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 am just trying to understand here. What happens if the unlink succeeds but this fails and _test_root_path_exists
throws as well?
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.
The usage is not going to update in that case, which is indeed undesired, but since usage calculation is not atomic anyhow, any failure can cause this.
I explained to @romayalon's question in the comment above that the overwrite block case is not an actual flow we invoke on purpose.
The reason we decided that write_block should handle overwrites was that we didn't want to fail user uploads on one hand, and we didn't want the usage to start getting skewed because of retries so we had to check if this is an overwrite first and "reduce" that replaced size.
I guess that simply failing the request if the same block is written with different data could just be better.
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.
For now I will keep the existing behavior and we can revise as needed in the future.
…a#7283) Signed-off-by: Guy Margalit <guymguym@gmail.com>
…a#7283) Signed-off-by: Guy Margalit <guymguym@gmail.com>
Explain the changes
config.BLOCK_STORE_FS_TIER2_ENABLED
- enable to set custom xattr trigger to signal the filesystem to migrate the data to archive tier (for filesystems that support that).config.BLOCK_STORE_FS_MAPPING_INFO_ENABLED
- enable to pass on extra recovery information (which bucket, object, offset, etc) to be added in block_md xattr, for cases when recovery without the db is needed.Issues: Fixed #xxx / Gap #xxx
Testing Instructions:
xattr -l <filename>
on mac).