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:
Create a new hook per namespace when zdb stops, triggering hook with namespace name, dirty index list, current active indexfile and datafile.
This hook will allows 3rd party script to save the exact state of the database, when closing.
Create a new hook called on zdb initialization, before trying to load any namespace.
This hook will allows 3rd party script to restore full index and last datafile before starting.
In addition for extra information, the current index and datafile will be added to NSINFO aswell.
(cc @OmarElawady for qsfs)
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:
per namespace
when zdb stops, triggering hook with namespace name, dirty index list, current active indexfile and datafile.In addition for extra information, the current index and datafile will be added to
NSINFO
aswell. (cc @OmarElawady for qsfs)