Commit graph

231 commits

Author SHA1 Message Date
Martin Sumner
01f0dadbb3 Add access to SQN
Use book_sqn/3 or book_sqn/4 to get the SQN of an object in the store.
2019-03-13 16:21:03 +00:00
Martin Sumner
be6e23f7de Change cache_size in sst tests
Makes results more predictable (with coin toss variations)
2019-01-29 13:40:55 +00:00
Martin Sumner
e3bd83179a Uncomment tests! 2019-01-27 23:31:44 +00:00
Martin Sumner
8f6862a10b Test sst slot configuration change
Confirm it results in many more files, if the slot count reduced.  Has to handle the fact that Level 0 file has unlimited slots regardless of number of slots configured
2019-01-27 22:03:55 +00:00
Martin Sumner
e349774167 Allow clerk to be stopped during compaction scoring
This will stop needless compaction work from being completed when the iclerk is sent a close at this stage.
2019-01-25 12:11:42 +00:00
Martin Sumner
0333604fd9 Change to cast in inker/iclerk interaction
This allows for leveled_iclerk:clerk_stop to be a sync call, so that files will only be closed once the iclerk has stopped.  This is designed ot prevent iclerk crashes during shutdowns when files it is depnding on are closed mid shutdown.
2019-01-24 21:32:54 +00:00
Martin Sumner
28d0aef5fe Make check that compaction not ongoing before accepting new compaction
Respond 'busy' if compaction is ongoing
2019-01-24 15:46:17 +00:00
Martin Sumner
c060c0e41d Handle L0 cache being full
A test thta will cause leveled to crash due to a low cache size being set - but protect against this (as well as the general scenario of the cache being full).

There could be a potential case where a L0 file present (post pending) without work backlog being set.  In this case we want to roll the level zero to memory, but don't accept the cache update if the L0 cache is already full.
2019-01-14 12:27:51 +00:00
Martin Sumner
672cfd4fcd Allow for run-time changes to log_level and forced_logs
Will not lead to immediate run time changes in SST or CDB logs.  These log settings will only change once the new files are re-written.

To completely change the log level - a restart of the store is necessary with new startup options.
2018-12-11 21:59:57 +00:00
Martin Sumner
6677f2e5c6 Push log update through to cdb/sst
Using the cdb_options and sst_options records
2018-12-11 20:42:00 +00:00
Martin Sumner
f274d2a63a Tighten acceptable duration
even with cover, passes in 30s.
2018-12-10 13:23:39 +00:00
Martin Sumner
e73f48a18b Add failing test
Test fails as fetching repeated object is too slow.

```Head check took 124301 microseconds checking list of length 5000

Head check took 112286 microseconds checking list of length 5000

Head check took 1336512 microseconds checking list of length 5

2018-12-10T11:54:41.342 B0013 <0.2459.0> Long running task took 260788 microseconds with task of type pcl_head

2018-12-10T11:54:41.618 B0013 <0.2459.0> Long running task took 276508 microseconds with task of type pcl_head

2018-12-10T11:54:41.894 B0013 <0.2459.0> Long running task took 275225 microseconds with task of type pcl_head

2018-12-10T11:54:42.173 B0013 <0.2459.0> Long running task took 278836 microseconds with task of type pcl_head

2018-12-10T11:54:42.477 B0013 <0.2459.0> Long running task took 304524 microseconds with task of type pcl_head```

It taks twice as long to check for one repeated object as it does to check for 5K non-repeated objects
2018-12-10 11:58:21 +00:00
Martin Sumner
8e687ee7c8 Add user-defined functions
To allow for extraction of metadata, and building of head responses - it should eb possible to dynamically and user-defined tags, and functions to treat them.

If no function is defined, revert to the behaviour of the ?STD tag.
2018-12-06 21:00:59 +00:00
Martin Sumner
881b93229b Isolate better changes needed to support changes to metadata extraction
More obvious how to extend the code as it is all in one module.

Also add a new field to the standard object metadata tuple that may hold in the future other object metadata base don user-defined functions.
2018-12-06 15:31:11 +00:00
Martin Sumner
510994233e Add check that index disappears
Check I0 count goes down when that index is removed
2018-12-05 15:42:21 +00:00
Martin Sumner
cf1fcaeef2 Add test of index expiry
To show how this works, and prove that it does work thta way.

Test may require adjusting if tested on a slow node (e.g. reduce KeyCount or increase TTL)
2018-12-05 15:18:20 +00:00
Martin Sumner
578a9f88e0 Support for log settings at startup
Both log level and forced_logs.  Allows for log_level to be changed at startup ad runtime.  Also allow for a list of forced logs, so if log_level is set > info, individual info logs can be forced to be seen (such as to see stats logs).
2018-12-05 00:17:39 +00:00
Martin Sumner
6d2d0694e3 Reverse necessary on bucket list
The function should see the buckets in order, so it accumulates in such a way to reverse the order - it makes sense that the outcome should be in reverse.
2018-11-23 19:03:24 +00:00
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
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