Writing a sufficiently sophisicated parser is too much work, and unlikely to be successful soon. Instead this change simply loads the entire dump as one command, and allows the underlying SQLite support to parse it correctly. This will definitely work, but since the load goes over Raft, it may hit limits with regards to network transfer sizes. Right now any limitations in that area are unknown.
Therefore this functionality remains somewhat experimental.
This allows us to grab a raw snapshot of the databse.
v2: s/RawDBSnapshot/Database, remove reference to raft from the comment.
v3: add a leader arg to Database to do a leader check
v4: fix doc string.
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
This is useful in case the server needs to store other metadata (e.g. auth
data) along side the peer list.
The logging bit is handy in case something has its own logging framework
that it wants to use.
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
This was possible previously, but would need to be set everytime on
startup via the API. This change allows it to set at startup AND enables
foreign constraint checking by default.
Integrate TCP mux with cluster and store
This change allows any node, including followers, to use the Raft log to make changes to a cluster-wide state.