Commit graph

269 commits

Author SHA1 Message Date
Martin Sumner
1a3d3daa89 Add regex support to $key index
Regex to be applied to key only
2018-09-21 12:04:32 +01:00
Martin Sumner
c439e4144a Add new book_headonly/4 API
To address special situation of performing a head requets in head_only mode - where a sub-key is a required input.
2018-09-20 12:08:33 +01:00
Russell Brown
ad7a3e7593 For quviq and TA, helper for eqc object generation 2018-09-17 10:09:28 +01:00
Martin Sumner
6a87f398f2 Reduce object count in simple backup
This test is almost entirely covered by `hot_backup_changes` now.
2018-09-09 18:19:25 +01:00
Martin Sumner
0cfdcb1976 Remove double test
should now be covered by the _changes test
2018-09-07 21:03:09 +01:00
Martin Sumner
bbb667b09f Add test of repeated backups
Confirm that file counts in the backup folder rise and fall as expected
2018-09-07 17:24:27 +01:00
Martin Sumner
b99cde9599 Merge branch 'master' into mas-i164-hotbackup 2018-09-07 12:27:30 +01:00
Martin Sumner
9a8ce88ed2 Add double-backup test
Added a test with back-to-back backups.  This caused issues with the empty CDB file it created (on opening, couldn't cope with last key of empty).

So now backup won't roll the active journal if it is empty.
2018-09-07 10:24:51 +01:00
Martin Sumner
daf0a1a607 Accumulate generated objects efficienty 2018-09-06 17:50:59 +01:00
Martin Sumner
0838ff34e5 Initial hot_backup
The idea being that a consistent inker manifest and set of journal files is guaranteed - with hard links to the actual manifest files.
2018-09-06 17:50:30 +01:00
Russell Brown
3a2d4aa496 Actually run the new test
DERP!
2018-09-06 16:38:49 +01:00
Russell Brown
b7bd65d11f Provide a top level API for folds
As the fold functions have been added to get_runner in an ad hoc way,
naturally, given the ongoing development of levelEd to support Riak,
it was difficult for a new user (in this case Quviq) to see what folds
are supported, and with what arguments, and expectations.

This PR is for discussion. It is one of many ways to group, spec, and
document the fold functions.

A test is also added for coverage of range queries.
2018-09-06 15:01:54 +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
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
eb5d9596b2 Add comments to test
Also loads some more objects to potentially make results clearer
2018-05-17 18:20:16 +01:00
Martin Sumner
989f23bca6 Add cache population for non-yielding range fetches
More likely to require caching at lower levels.
2018-05-17 16:38:52 +01:00
Martin Sumner
779ccd9c2a Add use of block index when not cached (for fetch range) 2018-05-17 14:56:15 +01:00
Martin Sumner
18aabb49ba Segment filter and multiple keys in slot
An issue was spotted.  If we use a segment filter in a query, and there are multiple matches within a given slot - only the first match is returned.

Tests didn't detect this.  Now they do, and the issue is resolved.
2018-05-16 17:24:23 +01:00
Martin Sumner
9cc27469c1 Add test to invoke segment filter issue
there is an issue if you have a segment filter, and there is more than one match in the slot.
2018-05-16 15:11:08 +01:00
Martin Sumner
2cd20fcb47 Missed generate_uuid reference 2018-05-03 18:26:02 +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
0185b3aa7d Fix Accumulators
Correct inefficient list accumulators
2018-05-02 00:23:26 +01:00
Martin Sumner
82a1449447 Fix bad accumulator in test
Test takes a long time due to sleep (still need to work on that), but also FoldKeysFun uses ++ rather than [{B, K}|Acc] to extend the list.  Order of magnitude speed-up for these queries by changing the way this accumulates
2018-05-01 22:30:28 +01:00
Russell Brown
10659bfbd5 Add CT tests for riak $ indexes
The project has been at 100% coverage, don't ruin it now!
2018-04-16 17:19:20 +01: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
bb39498ec5 Missed log line added back
.. and covered in test
2017-12-04 15:26:01 +00:00
Martin Sumner
cb10a00845 Make test reliable
Might corrupt the wrong journal otherwise
2017-11-28 14:57:17 +00:00
Martin Sumner
58946a7f98 Amend SST Timing Capture
Use sampling mechansm from CDB timing capture.  Do it less though - as far more SST fetches in comparison to CDB fetches.
2017-11-21 17:00:23 +00:00
Martin Sumner
5b4bc1ce59 Merge branch 'master' into mas-i108-cdbtimings 2017-11-20 17:34:50 +00:00
Martin Sumner
faa5ef82aa Test logging of samples
To prompt the log the journal size needs to be reduced
2017-11-20 15:31:31 +00:00
Martin Sumner
d5babe0c29 Expand tests for coverage
Prove tests handle SQN over batch, and also can handle mismatched tags in the store.
2017-11-20 10:21:30 +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
29ffb74a5b Add coverage for CDB delete_pending with snapshot
CDB file in delete_pending state, and times out but the Inker has a snapshot open - and so the file is not deleted.
2017-11-09 12:02:03 +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
8f27b3b628 Merge branch 'master' into mas-aae-segementfoldplus 2017-11-07 11:22:56 +00:00
Martin Sumner
f358bd7622 Switch to using passed in compression method for maybe_compress
When the compaction discovers compression is required it will used the passed in method at startup - not the method which had been previously defined.
2017-11-06 21:16:46 +00:00
Martin Sumner
9a0a4ced0d Test LZ4 from uncompressed
Coverage issue
2017-11-06 19:42:35 +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
99428d0e55 Remove erroneously added file 2017-11-03 14:26:51 +00:00
Martin Sumner
0ecb83f8ec Remove eroneously added files 2017-11-03 14:26:18 +00:00
Martin Sumner
9fa8ed6cca Add LZ4 2017-11-03 14:18:49 +00:00
Martin Sumner
4fbb770a8c Revert "Failed attempt to hack in LZ4"
This reverts commit 912920a53c.
2017-11-03 11:47:25 +00:00
Martin Sumner
912920a53c Failed attempt to hack in LZ4 2017-11-03 11:47:00 +00:00