Commit graph

184 commits

Author SHA1 Message Date
martinsumner
b43ec0de7e Fix the fix 2016-11-08 00:46:01 +00:00
martinsumner
6f0abea401 Stop unncessary handling of pending_delete in test 2016-11-08 00:44:51 +00:00
martinsumner
105d3b66f2 Add hash clash unit tests
Add unit tests for keys with clashing hashes
2016-11-07 23:53:14 +00:00
martinsumner
b47f8963d5 Speed of corrupted sft unit test
Test too slow when running with coverage
2016-11-07 19:20:46 +00:00
martinsumner
5a36f053d9 End-to-end testing of corrupted bloom
Add a unit test calling the API of a SFT file clerk with a corrupted
bloom
2016-11-07 18:26:55 +00:00
martinsumner
05338a1e85 Switch SFT to fsm
To amke it easier to context switch between the two file formats, make
the SFT file clerk a FSM like the CDB one.
2016-11-07 17:08:50 +00:00
martinsumner
aacf377f0a Provide project summary 2016-11-07 15:02:09 +00:00
martinsumner
b9090a3109 Testutil and pause 2016-11-07 12:19:17 +00:00
martinsumner
e2670e6e8c Testutil and Pause
Part of the testutil code is not recognising pause
2016-11-07 12:18:00 +00:00
martinsumner
8035583301 Comment review 2016-11-07 11:17:13 +00:00
martinsumner
079e713e16 Comment fiddling 2016-11-07 11:07:12 +00:00
martinsumner
6bf72849bc Comments reviewed 2016-11-07 11:02:38 +00:00
martinsumner
8f068c1280 Fixup API to allow for Tags to be passed
plus fixes to previous commits moving API functions into testutil
2016-11-07 10:42:49 +00:00
martinsumner
37c23a5b38 Shift pause out of leveled
Leveled will now signal the need for a pause due to back-pressure, but
not actually pause itself.  The hope is that in a riak implementation
this pause can be managed by the put_fsm, and so not lock the store.
2016-11-07 10:27:38 +00:00
martinsumner
4583460328 Clean API of Riak-specific Methods
Clena the API of Riak specific methods, and also resolve timing issue in
simple_server unit test.  Previously this would end up with missing data
(and a lower sequence number after start) because of the penciller_clerk
timeout being relatively large in the context of this test.  Now the
timeout has bene reduced the L0 slot is cleared by the time of the
close.  To make sure an extra sleep has been added as a precaution to
avoid any intermittent issues.
2016-11-07 10:11:57 +00:00
Martin Sumner
2d590c3077 More aggressive clerk 2016-11-05 17:50:28 +00:00
Martin Sumner
a7ed3e4b85 Trim dead branches
Also an experiment with altering the slowoffer_delay.
2016-11-05 15:59:31 +00:00
martinsumner
a73c233154 Correct the recording of excess work 2016-11-05 15:10:21 +00:00
martinsumner
376176eba3 Correct overlap in naming with Backlog 2016-11-05 14:35:01 +00:00
martinsumner
70dc637c97 Add slow offer support on write pressure
When there is write pressure on the penciller and it returns to the
bookie, the bookie will now punish the next PUT (and itself) with a
pause.  The longer the back-pressure state has been in place, the more
frequent the pauses
2016-11-05 14:31:10 +00:00
martinsumner
7f456fa993 Add back-pressure on work queue limit
Previously under heavy load, as long as L0 was being cleared, the ledger
woud keep accapting.  Now there is a formla limit on how far behind the
work queue (of compactions required at other levels) before the break is
applied on new updates coming in).
2016-11-05 14:04:45 +00:00
martinsumner
4556573a5c Rationalise logging on push_mem 2016-11-05 13:42:44 +00:00
martinsumner
9e410d65e3 Filename issue - not recording full filename in manifest
Broekn by change to get response on L0 completion, SFT was informing
penciller of the filename passed in (without extension), not the
completed one with the extension.
2016-11-05 12:49:15 +00:00
martinsumner
87b5bd0b18 Set Persisted SQN (regression)
As part of previous change had stopped setting the persisted SQN in the
ledger - which stopped journal compaction from working)
2016-11-05 12:03:21 +00:00
martinsumner
309ca2d6a1 Handle closing without an active handle (again) 2016-11-05 11:24:48 +00:00
martinsumner
61c6269200 Penciller back-pressure - Phase 1
There were issues with how the Penciller behaves under ehavy write
pressure - most particularly where there are a large number of keys per
update (i.e. 2i heavy objects).   Most immediately the attempt to chekc
whether the l0 file was ready slowed down the process of producing the
L0 file - so back-pressure created more back-pressure.

Going forward want to alter this most significantly as also the work
queue can build up unsustainably. there needs to be some pausing
prompted by the bookie on 'returned', and the use of 'returend when the
work queue exceeds a threshold.
2016-11-05 11:22:27 +00:00
martinsumner
34a90231e0 Prune dead branches 2016-11-04 19:33:11 +00:00
martinsumner
2299e1ce9d Prune unreachbale branches 2016-11-04 19:14:03 +00:00
martinsumner
a251f3eab0 Speed up query count test
Less individual querys to make count will speed up this taste, without
changing the nature of it
2016-11-04 18:20:00 +00:00
martinsumner
2b8a37439d Log refinement - logging process IDs 2016-11-04 17:28:04 +00:00
martinsumner
c306d49a85 CDB Logging
Setup CDB logging to use log base
2016-11-04 16:11:11 +00:00
martinsumner
479dc3ac80 Registering and releasing of Journal snapshots
Added a test of journal compaction with a registered snapshot and it
showed that the deleting of files did not correctly check the list of
registerd snapshots.  Corrected.
2016-11-04 15:56:57 +00:00
martinsumner
9abc1d643a Logging update
Add SFT logs to logbase
2016-11-04 14:53:19 +00:00
martinsumner
171baefc0c SFT Background Failure
Let it crash approach - stop trying to catch and propgate failure of
write
2016-11-04 14:31:19 +00:00
martinsumner
eeeee07081 Fold Objects - Check values test
Test that summed values in fold objects before and after restart
2016-11-04 14:23:37 +00:00
martinsumner
ba628c2f40 Test Rolling of CDB to two files trhough compaction
This exposed a potential issue with not opening readers in binary_mode -
so now defaults to binary mode.  Will add test using object filder to
confirm values remain readable in rolled journals after
shutdown/startup.
2016-11-04 12:22:15 +00:00
martinsumner
68b17c71b3 Expand fold objects support
Fold over bucket and fold over index added
2016-11-04 11:01:37 +00:00
martinsumner
9ea74836ee Alter impossible clause
Starts with {infinity, 0} so can never be {0.0}
2016-11-03 21:30:55 +00:00
martinsumner
41f00ba6fa Filename nonsense 2016-11-03 20:48:23 +00:00
martinsumner
dd99d624b1 Tangling with filenames
filename join does not work as expected
2016-11-03 20:46:56 +00:00
martinsumner
c3a6489b93 Ensure manifest dir when starting Penciller
Otherwise may fail based on test ordering
2016-11-03 20:09:38 +00:00
martinsumner
d5ac4d412d Use filename join
Potentiall to avoid *nix vs windows differences
2016-11-03 20:06:30 +00:00
martinsumner
ad9c886b65 Inker test for pending manifest
Should ignore the corrupted pending manifest file
2016-11-03 20:00:55 +00:00
martinsumner
72b9b35dac Dump test utility - does not need to cope with CRC failure
Dump is used in tests only
2016-11-03 19:55:19 +00:00
martinsumner
49eed55735 Remove unnecessary clause 2016-11-03 19:39:23 +00:00
martinsumner
341e245c09 Remove unnecessary no match condition 2016-11-03 19:34:54 +00:00
martinsumner
2716d912ea Timeout and close race
Race condition presvented in test - but still not handled nicely.
Perhaps need to consider making it a FSM and handling close differently
when L0 pending - i.e. don't close immediately, but set a timeout to
close on if we don't get the last fetch_levelzero
2016-11-03 19:02:50 +00:00
martinsumner
f41c788bff Minor quibbles
Move legacy CDB code used only in unit tests into test area.  Fix column
width in  pmem and comment out the unused case statement (in healthy
tests) from the penciller test code
2016-11-03 16:46:25 +00:00
martinsumner
37e20ccdfe L0 cache size counter improved
This is now accurate save for hash collisions.  It may now be a small
under-estimate, whereas previously it could be a large over-estimate.
2016-11-03 16:22:51 +00:00
martinsumner
4e46c9735d Log improvements
Continuation of log review and conversion to using central log function.

Fixup of convoluted shutdown process between Bookie, Inker and Inker's
Clerk
2016-11-03 16:05:43 +00:00