Commit graph

210 commits

Author SHA1 Message Date
Russell Brown
ef9ac672e5 Stop snapshots when the bookie stops
During EQC testing it was found that snapshots are still usable even
if the bookie process crashes. This change has snapshots monitor the
bookie and close when the bookie process dies.
2018-09-06 11:47:52 +01:00
Martin Sumner
c64dc1df0d Change key() definition to not allow integer keys 2018-09-03 12:28:31 +01:00
Martin Sumner
402dd2a663 Remove integer() support for keys
As number < atom() and so integer() < null.

This causes potential issues where we assume null < then any key value
2018-09-03 10:50:28 +01:00
Martin Sumner
f400e8b46d Add test for string and binary buckets
Tried an integer bucket - and this didn't work!

Integers are < null - and so is_empty won't work as expected.
2018-09-03 10:38:19 +01:00
Martin Sumner
ca8aa051d7 Add head_only fold_keys test 2018-09-03 10:29:20 +01:00
Martin Sumner
bde188e691 Constrain keys
Rather than supporting any() - constrain at least to binary()/integer() or string().
2018-09-01 12:10:56 +01:00
Martin Sumner
50967438d3 Switch from binary_bucketlist
Allow for bucket listing of non-binary buckets (integer buckets, buckets with ascii strings)
2018-09-01 10:39:23 +01:00
Martin Sumner
41fb83abd1 Add tests for is_empty
Where keys are strings or integers, and where subkeys are involved
2018-08-31 15:29:38 +01:00
Martin Sumner
076d2646c6
Merge pull request #155 from martinsumner/mas-i152-iclerkconfig
Mas i152 iclerkconfig
2018-07-24 12:13:38 +01:00
Martin Sumner
66a75923e8 Expose configuration of Compactio Percentage targets
I think these should be set differently, so make them configurable.
2018-07-23 12:46:42 +01:00
Martin Sumner
c4e376ece5 Don't link snapshots
If a snapshot breaks a penciller clone, this shouldn't crash the main process.
2018-07-10 10:25:20 +01:00
Martin Sumner
082eabb65b Switch to start_link
Start all processes linked - to collapse the whole tree if one process fails
2018-06-28 12:16:43 +01:00
Martin Sumner
aedeb0c934 Add support for with_lookup head_only
head_only mode cna be run with_lookup - but there is no L0 index created in this case.

So the L0 index wasn't returning a potition list and the L0 cache wasn't being checked.

Code now checks every  position in the L0 cache, when  a lookup is attempted in head_only mode.
2018-06-23 15:15:49 +01:00
Martin Sumner
8a61e5af78 Add extra checks 2018-06-08 14:12:07 +01:00
Martin Sumner
022997b2e6 Coverage issue
The scan_table situation where the query needs to be start inclusive, was consistently getting coverage.  It was less likely to get coverage with smaller cache sizes.

It is not clear why this wasn't being triggered before.  Perhaps because of the erroneous jitter setting?

Multiple cache sizes now tested to try and make sure the test is always  in-line with expectations.
2018-06-08 12:34:10 +01:00
Martin Sumner
589d947c01 Jitter proportionate to size
Not not default size
2018-06-07 18:08:54 +01:00
Martin Sumner
7c1f34c94f Format
Reverse mysterious tab displacement
2018-06-07 14:55:05 +01:00
Martin Sumner
319c6b4ca7 Undefined typo
Interetsingly setting  max_pencillercachesize to a non-integer merely had the impact of making the penciller cache size infinite.

So a guard added to make sure it is an integer going forward.
2018-06-07 14:53:34 +01:00
Martin Sumner
11d72013d2 Add open_options type
Make it easier to discover all the options and the defaults from reaidng the code.

Note default sync option is now none.  This doesn't mean this is recommended
2018-06-07 12:40:12 +01:00
Martin Sumner
a14941a122 Fix unexported types
file:location not exported?
2018-06-04 10:57:37 +01:00
Martin Sumner
6a20b2ce66 Use leveled_codec types
... and exporting them.

Previously types wer enot exported, and it appears dialyzer treated tham as any() when they were unexported types ??!!??
2018-05-04 15:24:08 +01:00
Martin Sumner
f88f511df3 leveled_codec spec/doc
Try and make this code a little bit more organised andd easier to follow
2018-05-03 17:18:13 +01:00
Martin Sumner
416aa7c0d3 Reference startup writeup 2018-05-02 16:03:03 +01:00
Martin Sumner
ef9ac57c5e Add information on startup options 2018-05-02 15:48:16 +01:00
Martin Sumner
ee5dc43cfd Add doc/spec to bookie
Improve the comments and dialyzer hints within the bookie.
2018-05-01 12:03:24 +01:00
Martin Sumner
8123e49c7a
Merge pull request #132 from martinsumner/mas-i126-intermittentfailure
Mas i126 intermittentfailure
2018-04-30 20:37:22 +01:00
Martin Sumner
37b067e61b Remove failure detection from eunit test
As it now consistently passes
2018-04-30 17:48:34 +01:00
Martin Sumner
941d4d2577 Fix issue with use of ets:next
ets:next is not StartInclusive - so we shouldn't use ets:next when querying the ledger cache, until it has been confirmed thta a matching key to the StartKey is not present.

This reoslves the intermittently failing unit test which highlighted this (and also makes that intermittent failure a permanent failure by expanding the test cases it covers).
2018-04-30 15:20:37 +01:00
Russell Brown
92582de4dd WIP: changes for backend_eqc test
Enable support for $key and $bucket index
2018-04-12 10:06:29 +01:00
Martin Sumner
6e51cbc853 is_alive not needed
Throwback when this was in terminate.
2018-04-10 12:22:00 +01:00
Martin Sumner
bb752f1025 de-terminate bookie 2018-04-10 09:54:35 +01:00
Martin Sumner
cda412508a IsEmpty check
Previously there was no is_empty check, and there was a workaround using binary_bucketlist.  But what if there were many buckets - this is a slow seek (using get next key over and over).

Instead have a proper is_empty check.
2018-03-21 15:31:00 +00:00
Martin Sumner
ef22aabe85 Alter comment 2018-03-20 11:11:41 +00:00
Martin Sumner
a9a20c9150 Smoother temrinate on destroy
don't try and terminate a dead process
2018-03-07 16:20:41 +00:00
Martin Sumner
e29743310d Make destroy "normal"
Put the special actions in the handle_call not the terminate
2018-03-07 16:14:50 +00:00
Martin Sumner
4bf6d3e73d Fiddle with naming in query API
Was easier in the calling applictaion to switch between using and not using a list of the Query format was consistent between those two cases.
2018-03-02 10:20:43 +00:00
Martin Sumner
861aa5a7db Support multi-query fold
Allow a single snapshot to run query over multiple ranges.   Used initially to fold over multiple buckets.
2018-03-01 23:19:52 +00:00
Martin Sumner
090e414b23 Coverage issues
Not making proxy object so get_size not required.

Extend tests to improve coverage
2018-02-16 20:27:49 +00:00
Martin Sumner
70dfb77088 Optional lookup in head_only mode
Allow decision to be made on startup whether ObjectSpecs can be looked up directly when running in head_only mode.
2018-02-16 17:06:30 +00:00
Martin Sumner
910ccb6072 Add lookup support in head_only mode
Originally had disabled the ability to lookup individual values when running in head_only mode.  This is a saving of about 11% at PUT time (about 3 microseconds  per PUT) on a macbook.

Not sure this saving is sufficient enought to justify the extra work if this is used as an AAE Keystore with Bitcask and LWW (when we need to lookup the current value before adjusting).

So reverted to re-adding support for HEAD requests with these keys.
2018-02-16 14:16:28 +00:00
Martin Sumner
2b6281b2b5 Initial head_only features
Initial commit to add head_only mode to leveled.  This allows leveled to receive batches of object changes, but where those objects exist only in the Penciller's Ledger (once they have been persisted within the Ledger).

The aim is to reduce significantly the cost of compaction.  Also, the objects ar enot directly accessible (they can only be accessed through folds).  Again this makes life easier during merging in the LSM trees (as no bloom filters have to be created).
2018-02-15 16:14:46 +00:00
Martin Sumner
f8ceedc9bb Compress L0 only
Doing at L1 has a negative impact as tests draw on.  Also improve head time tracking
2017-12-04 10:49:42 +00:00
Martin Sumner
f436cfd03e Add consistent timing points
Now all timing points should be made in a consistent fashion
2017-11-21 23:13:24 +00:00
Martin Sumner
50c81d0626 Make ink fold more generic
Also makes the fold_from_sequence loop much easier to follow
2017-11-17 14:54:53 +00:00
Martin Sumner
4c05dc79f9 Merge branch 'master' into mas-aae-segementfoldplus 2017-11-08 18:38:49 +00:00
Martin Sumner
7de4dccbd9 Extend journal compaction test
to cover with and without  waste retention.  Also makes sure that CDB files in a restarted store will respect the wast retention period set.
2017-11-08 16:18:48 +00:00
Martin Sumner
22e894c928 Allow waste retnetion to be ignored
If wast retention period is undefined, then it should be ignored - and no waste retained (rather than retaining waste for 24 hours as at present).

This wasn't working anyway - as reopen reader didn't get the cdb options (which didn't have the waste path on anyway) - so waste would not eb retained if the file had been opened after a stop/start.
2017-11-08 12:58:09 +00:00
Martin Sumner
5cee3a8e4e Tidy up spec
Also remove _app _sup originally added for dialyzer (due to false understanding they were needed for dialyzer)
2017-11-07 19:41:39 +00:00
Martin Sumner
8f27b3b628 Merge branch 'master' into mas-aae-segementfoldplus 2017-11-07 11:22:56 +00:00
Martin Sumner
0af0d85239 Add option description
Add documentation of new options
2017-11-07 10:22:27 +00:00