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

Feat: support copy file #99

Closed
KKould opened this issue Nov 11, 2024 · 3 comments
Closed

Feat: support copy file #99

KKould opened this issue Nov 11, 2024 · 3 comments
Assignees

Comments

@KKould
Copy link
Contributor

KKould commented Nov 11, 2024

If the snapshot is on the same filesystem as the original database, the SST files will be hard-linked, otherwise SST files will be copied

https://rocksdb.org/blog/2015/11/10/use-checkpoints-for-efficient-snapshots.html

CheckPoint will "copy" the WAL corresponding to MemTable and the related SSTable in Version. However, tonbo supports multiple FileSystems based on fusio. I think fusio can copy file to solve this problem.

@KKould KKould added the enhancement New feature or request label Nov 11, 2024
@KKould KKould self-assigned this Nov 11, 2024
@ethe
Copy link
Member

ethe commented Nov 11, 2024

fusio::Fs should provide a unified "copy file" semantic, "try hard-linked first otherwise copy" may be a good choice. To those platorms that do not support hard-link, falling back to copy would never be a wrong behavior.

@KKould
Copy link
Contributor Author

KKould commented Nov 11, 2024

the semantics of hard_link and copy_file are not consistent. For example, when the files of hard_link are modified, the contents will change together, but copy_file will not.

@ethe
Copy link
Member

ethe commented Nov 11, 2024

It is not a good formal name, maybe we can choose another one, but the semantic would be good to me.

@KKould KKould mentioned this issue Nov 11, 2024
3 tasks
@ethe ethe closed this as completed Nov 19, 2024
@ethe ethe removed the enhancement New feature or request label Dec 17, 2024
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

No branches or pull requests

2 participants