Commit graph

660 commits

Author SHA1 Message Date
martinsumner
c203e2ee06 Range queries - pass out as binaries
Avoid converting to erlang temr wihtin the FSM and then requiring a copy
outside of the FSM - pass out as a binary
2017-03-17 10:47:20 +00:00
martinsumner
f287895db0 Pass out slots as a binary
If we convetr firts to a list, then the list has to be copied - passing
out as binaries means the bulk can be passed as references
2017-03-17 10:43:34 +00:00
Martin Sumner
2e1a5e7537 Merge pull request #49 from martinsumner/mas-treelog
Debug excessive log
2017-03-16 20:03:41 +00:00
martinsumner
80b62cbff2 Debug excessive log
Logs excessively during 2i tests.  Set to debug for now, until can think
further about this
2017-03-16 20:03:18 +00:00
Martin Sumner
7c835eefc3 Merge pull request #48 from martinsumner/mas-snapshotlog
Remaining ledger snapshots log -> debug
2017-03-16 19:38:36 +00:00
martinsumner
8b2091cef7 Remaining ledger snapshots log -> debug
This log under 2i load appears thousands of times per second.  Not
sustainable as an info log.  Will need to think about how to manage
this, but setting back to debug for now
2017-03-16 19:37:39 +00:00
Martin Sumner
7f50540120 Merge pull request #47 from martinsumner/mas-pushmem-i46
Mas pushmem i46
2017-03-16 09:28:44 +00:00
martinsumner
5dbd7a2bc2 Check query out of range
It doesn't work - so protecting against it in fetch_range is pointless,
will blow up in lookup_slots
2017-03-16 08:43:18 +00:00
martinsumner
6199a2c352 RTrim
RTrim only worked in special case of key matching, that would never
occur in real world range query.  RTrim should really check for key
passing.

Returning empty list should not be possible - unless the query is
outside of the range entirely (and such a query should never go to this
SST).
2017-03-16 08:37:36 +00:00
martinsumner
dde37566b9 Add unit test for more than one slot 2017-03-15 16:40:43 +00:00
martinsumner
c6d17b998e Additional unit tests for SST range fetches
Resolve some of coverage issues
2017-03-15 11:27:46 +00:00
martinsumner
508da0be45 Additional unit tests 2017-03-14 22:47:48 +00:00
martinsumner
8a5ed1e198 Confirm skip on unknowns when compacting journal 2017-03-14 17:26:39 +00:00
martinsumner
878ec41ffa Merge remote-tracking branch 'refs/remotes/origin/mas-sstblockv2-i42' into mas-pushmem-i46
# Conflicts:
#	src/leveled_penciller.erl
2017-03-14 15:43:35 +00:00
martinsumner
4b60c0e35b Scan width semi-reverted
No evidence from valume test that the scan width has made a posiitve
difference - so reverting, but not fully as slots may now be twice as
big, so sticking to half previous value
2017-03-14 01:18:50 +00:00
martinsumner
19bc838d90 Fix bad exit with no FK 2017-03-14 00:52:07 +00:00
martinsumner
a1c49b668a Fix empty file again
No special definition of empty required, as now an empty list when empty
2017-03-14 00:17:09 +00:00
martinsumner
2b0ec1d9cc Don't double-loop on slots
Previous version built a list of slots, then iterated over it to build a
list of binaries.  This converts the slot to a binary before building
the list
2017-03-13 23:51:48 +00:00
martinsumner
4f0622d2ac Merge remote-tracking branch 'refs/remotes/origin/mas-sstblock-i42' into mas-sstblockv2-i42 2017-03-13 21:09:13 +00:00
martinsumner
c5bb150f97 Drop some logs
Not found to be interesting so far
2017-03-13 20:30:33 +00:00
martinsumner
54534e725f Experiment with smaller scan width
When testing with large numbers of 2i terms (and hence more Riak
Metadata), there is a surge in slow response times when there are
multiple concurrent merge events.

This could be veyr short term CPU starvation because of the merge
process.  Perhaps it is delays waiting for the scan to complete -
smaller scanwidth may mena more interleaving and less latency?
2017-03-13 19:53:12 +00:00
martinsumner
5311a157d5 Merge remote-tracking branch 'refs/remotes/origin/mas-sstblock-i42' into mas-sstblockv2-i42 2017-03-13 19:22:41 +00:00
martinsumner
c787e0cd78 Handle corrupted Ledger Key when applying recovery strategy
Otherwise may blow up in journal_compaction_bustedjournal test
2017-03-13 14:32:46 +00:00
martinsumner
f3e962c43a Add level to SST slow fetch log 2017-03-13 12:16:36 +00:00
martinsumner
62c3ba8b6f Passing ETS reference not tree
ETS reference gets converted to tree by Penciller
2017-03-13 11:54:46 +00:00
martinsumner
f2cd9b3f33 Consistency of empty slotlist references
Need to return an empty slotlist in a consistent way
2017-03-11 13:04:55 +00:00
martinsumner
1f8de798bd Fix empty slot issue 2017-03-11 12:41:30 +00:00
martinsumner
a07770a3df Unit tets of lookup over-size issue
A mistake meant resetting to lookup on a skipped key would cause issues
if the skipped key ocurred under a no_lookup slot after the ?SLOT_SIZE
had been reached.  This caused the slot to switch to lookup, but beyond
the maximum size
2017-03-11 00:03:55 +00:00
martinsumner
4e4f498f20 Correctly set no_lookup on skip_key
Otherwise could change to lookup after the size limit has been reached
2017-03-10 23:48:17 +00:00
martinsumner
1813317121 Correctly identify empty slotlist 2017-03-10 22:49:00 +00:00
martinsumner
b2f3d882a9 Draft of branch to condense range_only keys 2017-03-10 20:43:37 +00:00
martinsumner
730ab2ec48 tidy out io:format 2017-03-10 11:10:15 +00:00
martinsumner
601f43de3d Merge remote-tracking branch 'refs/remotes/origin/master' into mas-sstblock-i42 2017-03-10 10:24:51 +00:00
Martin Sumner
121f410b8f Merge pull request #45 from martinsumner/mas-shortenfilepath
Mas shortenfilepath
2017-03-10 08:59:41 +00:00
martinsumner
d7eee2f9c9 Remove rogue log 2017-03-09 22:24:11 +00:00
martinsumner
39a005a8d0 Try and be consistent in flilename format
i.e. ./filename.sst
2017-03-09 21:52:29 +00:00
martinsumner
bfcf981485 Correct root path setting in pclerk 2017-03-09 21:32:36 +00:00
martinsumner
4c59342600 Change SST reference to split filename
The manifest and the logs are bloated by having the full file path for
every filename in there - given the root path is constant.

Could also cause issues if the mount point is ever changed.
2017-03-09 21:23:09 +00:00
Martin Sumner
3582f4bc34 Merge pull request #44 from martinsumner/mas-manifestbug-i43
Mas manifestbug i43
2017-03-09 09:42:11 +00:00
martinsumner
3b2d8691b2 Make sure selection is just the manifest entry 2017-03-08 15:10:08 +00:00
martinsumner
90b587b083 Allow manifest entry to be selected from level 2 2017-03-08 12:09:10 +00:00
martinsumner
04cfb453c4 Fetch specific block only
Rely on CRC check in zlib.  Still need to catch on failure
2017-03-07 20:19:11 +00:00
Martin Sumner
3c5740e7bf Merge pull request #41 from martinsumner/mas-2iphase2-i34
Mas 2iphase2 i34
2017-03-07 11:59:05 +00:00
martinsumner
cd82bba6cd Use cache size - don't recalc length 2017-03-06 21:44:20 +00:00
martinsumner
9ad6969b0d Seed randomnes at Actor startup 2017-03-06 21:35:02 +00:00
martinsumner
32cdf26ffb Correct to catch new response to snapshot request 2017-03-06 19:37:43 +00:00
martinsumner
87f2c5d7ae Merge remote-tracking branch 'origin/mas-2iphase2-i34' into mas-2iphase2-i34
# Conflicts:
#	src/leveled_log.erl
2017-03-06 18:44:22 +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
Martin Sumner
c1dc92720c Random, random, random
well random had me foxed.  As the clone was short-lived process it only
called random once - and so always got the same answer.

random has to be seeded to give different answers when called once from
a process - so this is now seeded in leveed_log
2017-03-06 13:51:38 +00:00
martinsumner
eb6f668fcd Use log at random
Easy way to sample frequent things - especially when they'r ein ocverag
equeries
2017-03-06 10:34:56 +00:00