hraft-dispatcher icon indicating copy to clipboard operation
hraft-dispatcher copied to clipboard

Use bbolt as snapshot store

Open wraymo opened this issue 2 years ago • 7 comments

This PR is based on #7. Try to implement bbolt snapshot instead of file snapshot.

wraymo avatar Apr 26 '22 03:04 wraymo

@tangyang9464 @closetool @sagilio please review

casbin-bot avatar Apr 26 '22 03:04 casbin-bot

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 26 '22 03:04 CLAassistant

Updated the changes. Please take a look

wraymo avatar Apr 30 '22 14:04 wraymo

Currently, we are using the file snapshot store, if we switch the bbolt as snapshot store, maybe this breaks user data, do you have idea to improve this?

nodece avatar May 01 '22 14:05 nodece

Currently, we are using the file snapshot store, if we switch the bbolt as snapshot store, maybe this breaks user data, do you have idea to improve this?

I'm not sure whether we can simply migrate file snapshots to bbolt, that is to read file snapshots and put key-value pairs into bbolt.

wraymo avatar May 01 '22 15:05 wraymo

This is a good idea, I think we can add a flag here, default to file snapshot, if the user switches the bbolt snapshot, we need to check whether the file snapshot exists, if true, we need to migrate the file snapshot to bbolt snapshot.

nodece avatar May 02 '22 07:05 nodece

This is a good idea, I think we can add a flag here, default to file snapshot, if the user switches the bbolt snapshot, we need to check whether the file snapshot exists, if true, we need to migrate the file snapshot to bbolt snapshot.

I just added relevant code.

wraymo avatar May 02 '22 22:05 wraymo