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

Question about the consistency operations in cowbtree backend #38

Open
Oliver-Luo opened this issue Jan 11, 2017 · 2 comments
Open

Question about the consistency operations in cowbtree backend #38

Oliver-Luo opened this issue Jan 11, 2017 · 2 comments

Comments

@Oliver-Luo
Copy link

I've found that we are using two kinds of techs to keep the file on disk consistent in the cowbtree backend, copy-on-write and transaction. To my understand, either of them could guarantee the consistency, so why us them at the same time?

After reading the codes under persistent-data(like dm-btree/dm-transaction-manager), I thought this problem may come from using these codes, since they are like a whole. If you choose to use dm-btree, you have to use dm-block-manager and dm-transaction-manager as well, which means transaction and copy-on-write are somehow like the "side effect" of choosing dm-btree. If that is true, then I think we could only use one of these two techs by using our own code, thus saving the other one's overhead. Is that right?

@sectorsize512
Copy link
Member

Hi Oliver,

Dm-dedup core logic needs a key-value store like API to store its metadata (e.g., hash index and mapping). So, dm-btree was a logical choice because it provides a key-value API. Furthermore, dmdedup needs some transactional and consistency guarantees from its baceknds. And dm-btree provides these guarantees using dm-transaction-manager.

One could surely design a dm-dedup backend that uses dm-transaction-manager directly. But then the key-value store has to be implemented by the backend itself (e.g., like a table in DTD or anything else).

Best,
Vasily

@Oliver-Luo
Copy link
Author

Hi Vasily,

Do you mean that we have to use the dm-transaction-manager to keep the IO shadowing feature of the cowbtree? As I understand, the last step, or the "commit" step of the cowbtree must be atomic to keep the consistency, so the dm-transaction-manager is used for that, right?

Yours,
Oliver

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