threefoldtech / 0-db

Fast write ahead persistent redis protocol key-value store
Apache License 2.0
39 stars 10 forks source link

hook: improve shutdown/starting to save and restore database #125

Closed maxux closed 1 year ago

maxux commented 2 years ago

Current hook system allows immutable file upload/download but doesn't fully covers database loading/closing.

Engine expect database to be sane before starting, a sane database is: a full index present and the last datafile (not immutable) present. All other datafiles can be offloaded safely.

Except with some hack, there is no clean way to restore database or save database when zdb starts/stop. Here is a suggestion:

In addition for extra information, the current index and datafile will be added to NSINFO aswell. (cc @OmarElawady for qsfs)

maxux commented 1 year ago

This is implemented, afaik