Add more complex snapshot test

This exposed another off-by-one error on startup.

This commit also includes an unsafe change to reply early from a rolling
CDB file (with lots of objects writing the hash table can take too
long).  This is bad, but will be resolved through a refactor of the
manifest writing:  essentially we deferred writing of the manifest
update which was an unnecessary performance optimisation.  If instead we
wait on this, the process is made substantially simpler, and it is safer
to perform the roll of the complete CDB journal asynchronously.  If the
manifest update takes too long, an append-only log may be used instead.
This commit is contained in:
martinsumner 2016-10-07 10:04:48 +01:00
parent f58f4d0ea5
commit 2055f8ed3f
6 changed files with 307 additions and 183 deletions

View file

@ -29,15 +29,13 @@
root_path :: string(),
cdb_options :: #cdb_options{},
start_snapshot = false :: boolean(),
source_inker :: pid(),
requestor :: pid()}).
source_inker :: pid()}).
-record(penciller_options,
{root_path :: string(),
max_inmemory_tablesize :: integer(),
start_snapshot = false :: boolean(),
source_penciller :: pid(),
requestor :: pid()}).
source_penciller :: pid()}).
-record(bookie_options,
{root_path :: string(),