Commit graph

157 commits

Author SHA1 Message Date
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
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
2063cacd8f More spec/doc work in leveled_codec
Note that at some stage KeyChanges got overloaded to mean {KeyChanges, TTL}, and the spec now tries to make this a bit clearer
2018-05-04 11:19:37 +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
a9db4a0082 Spec and comment Inker 2018-05-02 10:57:27 +01:00
Martin Sumner
293bd8fb78 de-terminate inker 2018-04-10 10:05:46 +01: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
0e071d078e fold_objects in SQN order
This adds a test that fold_objects works in SQN order
2017-11-17 18:30:51 +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
39ad5c9680 Make inker fold generic
ink_loadpcl is in effect an inker fold - so abstract out the inker fold part to make this a generic capability
2017-11-15 16:08:24 +00:00
Martin Sumner
f55cbbeac3 OTP 19 requires defaults in dialyzer 2017-11-13 14:02:39 +00:00
Martin Sumner
4c05dc79f9 Merge branch 'master' into mas-aae-segementfoldplus 2017-11-08 18:38:49 +00:00
Martin Sumner
1d2effc773 Improve docs and specs
Focus on leveled_cdb
2017-11-08 15:09:23 +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
e8bd712fb8 Tidy up test shutdown 2017-11-08 11:20:22 +00:00
Martin Sumner
8f27b3b628 Merge branch 'master' into mas-aae-segementfoldplus 2017-11-07 11:22:56 +00:00
Martin Sumner
1d475235d1 Improve test coverage
Make compress on receipt/compaction configurable
2017-11-06 18:44:08 +00:00
Martin Sumner
61b7be5039 Make compression algorithm an option
Compression can be switched between LZ4 and zlib (native).

The setting to determine if compression should happen on receipt is now a macro definition in leveled_codec.
2017-11-06 15:54:58 +00:00
Martin Sumner
6beeadc7d8 Simplify SnapSQN check
Less ugly
2017-11-01 19:31:20 +00:00
Martin Sumner
400202e38d Simpliy test assertion 2017-11-01 17:50:01 +00:00
Martin Sumner
bfaed921e6 Split code for folders - introduce runner actor
Introduce a dedicated module for all the different fold types.  Also simplify the list of folders by deprecating those folds that should eb achieveable by fold_heads/fold_objects type folds but with smarter functions.

Makes sure that the fold functiosn also have better spec coverage, and are dialyzer checked.
2017-10-17 20:39:11 +01:00
Heinz N. Gies
25389893cf Add compatibility for old and new random / rand functions 2017-08-01 11:24:12 +02:00
Heinz N. Gies
eece253222 Cleanup most dialyzer errrors in leveled_inker 2017-07-31 19:47:58 +02:00
martinsumner
f23072fb54 Merge remote-tracking branch 'refs/remotes/origin/master' into mas-specs-i61b 2017-05-26 13:45:20 +01:00
martinsumner
c664176247 Release penciller snapshot after journal compaction
As otherwise memory consumption beocmes an issue, as they will take an
hour to timeout naturally.
2017-05-26 10:51:30 +01:00
martinsumner
366253831a Add dpecs to inker
Give the dialyzer a hand
2017-05-22 15:31:42 +01:00
Martin Sumner
8e334c0b5a Merge pull request #63 from martinsumner/mas-compactscore-i35
Mas compactscore i35
2017-05-22 09:57:32 +01:00
martinsumner
11ff3129f3 Reduce compaction targets
Cmpaction is overly aggressive.  It is a lot of work to compact a run of
files for just 20% reduction in disk space, when disk space for the
Journal (i.e. low IOPS disk space should be relatively inexpensive).
Require at least a 40% reduction for a compaction job.
2017-03-30 12:15:36 +01:00
martinsumner
6143fcb664 Remove binary_to_term
when fetching don't need to binary_to_term key changes
2017-03-29 15:37:04 +01:00
martinsumner
f3ffa920af Trying to standardise binary manipulation of value
Looking into theory that use of term_to_binary is imperfect.  Also may
be better to compress values only when they are compacted?
2017-03-20 15:43:54 +00:00
martinsumner
9ad6969b0d Seed randomnes at Actor startup 2017-03-06 21:35:02 +00:00
martinsumner
c92107e4b4 2i order of events
When running a load of mainly 2i queries, there is a huge cost in the
previous snapshot code.  The time taken to create a clone of the
Penciller (duplicating all the LoopState) varied between 1 and 200ms
depedning on the size of the LoopState.

For 2i queries, most of that LoopState was then being thrown away after
running the query against the levelzero_cache.  This was taking < 1ms on
average.  It would be better to avoid the o(100)ms of CPU  burning and
block for o(1)ms - so th eorder of events have been changed ot filter
first so only the small part of the LoopState actually required is
copied to the clone.
2017-03-06 18:42:32 +00:00
martinsumner
27fdbf2ac8 Syntax 2017-02-26 22:46:57 +00:00
martinsumner
44471ecc0a ManEntry must be a ManEntry?
What else could it be?
2017-02-26 22:42:44 +00:00
martinsumner
fb54d29873 Timestamps no longer required 2017-02-26 19:09:56 +00:00
martinsumner
fad9bfbff1 Trigger log points, deprecate lower PUT log points
Only record PUT timings at the Bookie, and trigger them correctly on the
right log point
2017-02-26 19:07:55 +00:00
martinsumner
266e851a96 Merge pull request #18 from martinsumner/mas-leveledtree
Mas leveledtree
2017-01-24 02:39:24 +00:00
martinsumner
3d99036093 Switch the LM1 cache to be a tree
Use a tree of lists not a skiplist
2017-01-20 16:36:20 +00:00
martinsumner
853f113ee5 Inker Manifest to be a two-level list
To eas seraching from front to back, change the inker manifest to be a
two-level list
2017-01-19 12:23:28 +00:00
Martin Sumner
1f406c76dd Resolve test issues 2017-01-19 09:47:56 +00:00
martinsumner
3ca928629c Split out inker manifest - load last key from manifest
The process of re-opening file included an expensive search for the
LastKey - now the LastKey can be provided out of the manifest.
2017-01-18 15:23:06 +00:00
martinsumner
3712c62a50 Broken WIP 2017-01-17 16:30:04 +00:00
Martin Sumner
676e8fa494 Add Get Timing 2016-12-22 15:45:38 +00:00
Martin Sumner
7a0cf22909 put-timing default
Remove need for individual actors to know the defaults for put_timing
tuple
2016-12-22 14:41:43 +00:00
martinsumner
130fb36ddd Add head timings
Include log breaking down timings of HEAD requests by result and level
2016-12-22 14:03:31 +00:00
martinsumner
c193962c92 Sort out different timestamps 2016-12-20 23:16:52 +00:00
martinsumner
060ce2e263 Add put timing points 2016-12-20 23:11:50 +00:00
martinsumner
2d3a40e6f1 Magic Hash - and no L0 Index
Move to using the DJ Bernstein Magic Hash consistently, and trying to
make sure we only hash once for each operation (as the hash is more
expensive than phash2).

The improved lookup time for missing keys should allow for the L0 index
to be removed, and hence speed up the completion time for push_mem
operations.

It is expected there will be a second stage of creating a tinybloom as
part of the SFT creation process, and then adding that tinybloom to the
manifest.  This will then reduce the message passing required for a GET
not in the cache or higher levels
2016-12-11 01:02:56 +00:00