0-db icon indicating copy to clipboard operation
0-db copied to clipboard

scrubbing on ZDB

Open robvanmieghem opened this issue 5 years ago • 1 comments

  • delete on ZDB
  • needs to be configurable e.g. when to use (should not be used when high load)
  • delete should still allow us to go back to history
  • NEED INFO & SPECS

robvanmieghem avatar Nov 03 '20 11:11 robvanmieghem

Right now, if you delete a key, requesting history will fails (key not found). Data are still reachable on disk. There is just a flag set (deleted flag).

Scrubbing is intended to be external process (could be integrated to zdbd if needed), when scrubbing, expected workflow for now is:

  • locking namespace in read only (https://github.com/threefoldtech/0-db/issues/81)
  • do quick scrub (https://github.com/threefoldtech/0-db/issues/80)
  • freeze namespace (completly lock it) (https://github.com/threefoldtech/0-db/issues/82)
  • replace files in the namespace
  • reload namespace (implemented)
  • unfreeze/unlock namespace

All of this can be done without restarting zdb.

Right now, scrubbing will completely remove all deleted data. Entries will be still there (you could still know timestamp of history, but data are truncated). If some deleted data should be kept, another flag should be set. Which one ?

maxux avatar Nov 03 '20 13:11 maxux