Storage upgrade (new indexes and stuff).
Closed, ResolvedPublic

Description

We need an upgrade procedure if we make changes to storage.

As a first step Sink::Store::upgrade() provides a hook that can be used to drive the process ("sinksh upgrade") calls this function.
In a first implementation this now simply nukes all local caches so you have to resync (This will also nuke any local changes that have not yet been replayed).

What we want out of this system is:

  • Allow Kube to initially block while displaying a "Please wait while upgrading..." message.
  • Support building newly added indexes, remove removed indexes, change changed indexes... etc. as part of the upgrade procedure.
  • Detect if the storage has not yet been upgraded elsewhere and refuse to read/write before that is completed (because otherwise we can't tell what's going to happen).

This is now implemented.
What doesn't work is reloading the databases in the client process.
For this the process would have to receive a notification that allows it to nuke all in-process lmdb environments, otherwise we end up crashing on the next access to disk.
To avoid this kube currently just requires the user to restart the process.

cmollekopf moved this task from Backlog to 0.6 on the Kube board.Feb 15 2018, 2:25 PM
cmollekopf edited projects, added Kube (0.6); removed Kube.
cmollekopf moved this task from Backlog to Done on the Kube (0.6) board.Feb 19 2018, 4:55 PM
cmollekopf closed this task as Resolved.Jun 19 2018, 12:13 PM
cmollekopf claimed this task.