Commit graph

242 commits

Author SHA1 Message Date
Martin Sumner
a9aa23bc9c Bucket list
update the docs to advertise throw capability.  Test it for bucket list (and fix ordering of bucket lists)
2018-11-23 18:56:30 +00:00
Martin Sumner
ef2a8c62af Add capability to exit a head or object fold with a throw
This allows for all fold functions to throw an exception to exit out of a fold with all dependencies still closed down as expected.

This was previously available for key folds, which was necessary for the folds to work in Riak (as max_results in index queries depends one xiting the fold with an exception).  This change now adds a ct test, and adds support for head folds, object folds (key order) and object folds (sqn order)
2018-11-23 16:00:11 +00:00
Martin Sumner
2afb160a12 Add test - large seglist 2018-11-07 21:35:21 +00:00
Martin Sumner
787b02e4d8 Switch to leveled_rand for compatibility 2018-11-07 17:01:51 +00:00
Martin Sumner
6f4f1b9560 Add membership timing tests - sets vs lists 2018-11-07 16:57:00 +00:00
Martin Sumner
e9fb893ea0 Check segment is as expected with tuplebuckets
In head_only mode
2018-11-05 10:31:15 +00:00
Martin Sumner
e72a946f43 TupleBuckets in Riak objects
Adds support with test for tuplebuckets in Riak keys.

This exposed that there was no filter using the seglist on the in-mmemory keys.  This means that if there is no filter applied in the fold_function, many false positives may emerge.

This is probably not a big performance benefit (and indeed for performance it may be better to apply during the leveled_pmem:merge_trees).

Some thought still required as to what is more likely to contribute to future bugs: an extra location using the hash matching found in leveled_sst, or the extra results in the query.
2018-11-05 01:21:08 +00:00
Martin Sumner
2eec8a5378 MaxCount monitoring and responding
Stop issue of {no_more_keys, Acc} being passed on fold over list of ranges to next range (and blowing up)
2018-11-01 23:40:28 +00:00
Martin Sumner
71fa1447e0 Allow for all keys head folds to used modifed range
This helps with kv_index_tictcatree with the leveled_so backend.  Now this cna do folds over ranges of keys with modified filters (as folds over ranges of keys must go over lal keys if the backend is segment_ordered)
2018-11-01 17:30:18 +00:00
Martin Sumner
376407fa66 Extend testing
In particular discover that after objects are modifed (outside of the LMD window) - they no longer appear in results for queries in the LMD window.
2018-10-31 21:37:53 +00:00
Martin Sumner
62f1302305 Add test comparing filter with non-filter
How do timings differ - does the SST filter accelerate?  The answer appears to be yes - the filtered version takes half the time.
2018-10-31 18:34:27 +00:00
Martin Sumner
19bfe48564 Initial ct test
Which exposed it wasn't working.  If there is no segment list passed - just a modification filter, you don't need to check the position list (as checking the position list returns an empty position so sipping all the matching results!)
2018-10-31 16:35:53 +00:00
Martin Sumner
f0208e9b12 Fix issues with deprecated folders
They were deprecated for a reason
2018-10-31 11:04:23 +00:00
Martin Sumner
2e2c35fe1b Extract deprecated recent_aae
Ready to add other forms of last modified filtering
2018-10-29 15:49:50 +00:00
Martin Sumner
0bbaf1f25e Handle missing journal files without data loss
Make sure data added after the journal has been lost will not be lost (even though lost data may stay lost)
2018-10-03 18:38:56 +01:00
Martin Sumner
9a0082db4e Test to expose startup issue
See #194
2018-10-03 18:29:20 +01:00
Martin Sumner
f95f078929 Merge branch 'master' into mas-i189-tuplebuckets 2018-09-27 16:53:18 +01:00
Martin Sumner
39e366a31b Add ct test
Which passes
2018-09-27 11:32:42 +01:00
Martin Sumner
0fb35e658f Add support for buckets that are tuples
Only {binary(), binary()} tuples
2018-09-27 09:34:40 +01:00
Martin Sumner
0772317247 Test mistake
If random integer was low, total could be below threshold - so calculate total correctly.

Should make value re-generate random uniform, but test is still valid without this
2018-09-25 18:32:48 +01:00
Martin Sumner
051fcd672c Add test of switching from a big journal to a little journal
And sending objects over the journal size
2018-09-25 16:56:24 +01:00
Martin Sumner
8f320a054e Add object deletion to test of dolerkey index
Related to tracking a failure in riak_test
2018-09-21 17:08:59 +01:00
Martin Sumner
37f784f041 Add regex tests for dollar bucket queries
Proce this works as well as for dollar key.  This isn't tested in riak_test currently, but seems illogical not to support it her eif it is supported on $key queries.
2018-09-21 15:17:29 +01:00
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