Commit graph

62 commits

Author SHA1 Message Date
Kresten Krab Thorup
5733075cda Make tests compile with Triq again 2012-09-25 11:31:13 +02:00
Joseph Wayne Norton
d143637f98 Disable triq and proper depends 2012-09-19 09:34:04 +09:00
Gregory Burd
e59c3d7add Avoid name collisions and do some other minor cleanup. 2012-07-24 16:39:28 -04:00
Gregory Burd
1c82b632b7 This will live in the basho_bench repo in a hanoidb branch. 2012-07-18 12:41:25 -04:00
Gregory Burd
3ae16aafa2 Add a basho_bench driver example config. 2012-07-18 07:53:31 -04:00
Gregory Burd
ce8982c79c Finished the cleanup and integration of an erlang bloom implementation. 2012-07-12 16:54:15 -04:00
Gregory Burd
c9d8ffa8ea WIP 2012-06-21 23:12:32 +01:00
Steve Vinoski
538518045c fix badmatch 2012-06-19 14:30:11 -04:00
Gregory Burd
fe73e4a48b WIP: working toward fixing the blocking fold test 2012-06-19 15:03:42 +01:00
Gregory Burd
bfdb63094f Remove Riak-specific integration code. Deliver it later as a separate repo. 2012-06-19 11:15:29 +01:00
Gregory Burd
fb01a7dd29 Improve tests. 2012-06-14 18:15:47 +01:00
Gregory Burd
49604c77d9 Whitespace, comments, etc. 2012-06-14 18:14:33 +01:00
Gregory Burd
db41532258 Allow keys to expire at different points in time as well as due to a global expiry time. 2012-06-14 18:11:41 +01:00
Kresten Krab Thorup
b6955c9a75 Refactor for expiry_secs option
Tree nodes now hold entries at the form

   {Key, ?TOMBSTONE 
       | BinValue
       | {?TOMBSTONE, TStamp}
       | {BinValue, TStamp}}

We use the form without TStamp when expiry_secs
is unset or set to 0 (i.e., values don't expire).

merger/writer: Move KV count into writer, because
now the writer:add determines if a value is expired
and thus wither a value is actually written.  Thus,
writer now has a new API function which returns the
KV count written so far.

reader: lookup/fold API hides the TStamp tuples,
so only the next_node API used by the merger
is exposed to these {Key, {_, TStamp}} entries.

nursery: like reader, the TStamp'ed tuples are
not exposed in the client API; expired values
are simply not returned from fold/lookup.

hanoidb: add config option {expiry_secs, N}.

other modules: Make sure that config is passed
all the way down through (sub) processes to be
able to utilize the config option everywhere.

test: update to work with new option.
2012-05-11 12:00:32 +02:00
Kresten Krab Thorup
14dd00ad12 Fix some doc strings to make edoc happy 2012-05-07 22:53:05 +02:00
Kresten Krab Thorup
e315b92faf Rename hanoi -> hanoidb 2012-05-07 17:22:55 +02:00
Kresten Krab Thorup
f9b7fcf224 Implement hanoi:destroy/1
Also riak_kv_hanoi_backend:drop/1 (The latter does
hanoi:destroy and then re-opens the same store).
2012-05-05 21:14:15 +02:00
Kresten Krab Thorup
96c5ec74c3 Minor changes to test code 2012-05-05 18:56:03 +02:00
Kresten Krab Thorup
70fc4030f6 Enable quick check for backend tests
Actual QC tests come from riak_kv
2012-05-02 17:11:08 +02:00
Kresten Krab Thorup
5e3417f9d6 Reenable quick check tests 2012-05-01 16:27:39 +02:00
Kresten Krab Thorup
682191ce06 Tree writing code was broken
In some cases, inner nodes were not being emitted.
This some times would cause queries (get / range_fold)
to only include results in a right-most branch.
2012-04-28 18:35:35 +02:00
Kresten Krab Thorup
eb63ce1d04 Fix two more unit tests 2012-04-27 10:23:52 +02:00
Kresten Krab Thorup
2d928fce73 Fix unit tests 2012-04-27 09:59:09 +02:00
Gregory Burd
43f095b3f0 Rename "lsm-btree" to "hanoi". 2012-04-21 15:20:39 -04:00
Gregory Burd
fec14a1c51 Put the copyright/license header into a few overlooked files. 2012-04-19 18:09:01 -04:00
Kresten Krab Thorup
ee90944c62 Implement incremental insert
This slows down insert to be log2(N), where N is
the total number of objects in the store.  The upside
is that it also removes the terrible worst case
scenarios for insert.
2012-04-19 19:57:39 +02:00
Kresten Krab Thorup
5f9f5c18d6 Add #btree_range to all fold ops
lets you specify this for fold operations

  #btree_range {
     from_key :: binary(),
     from_inclusive = true :: boolean(),
     to_key :: binary() | undefined,
     to_inclusive = false :: boolean(),
     limit = undefined :: pos_integer() | undefined
  }
2012-04-16 16:46:57 -04:00
Gregory Burd
8409df447d Another notfound -> not_found fix 2012-04-16 07:31:14 -04:00
Gregory Burd
b325f3e792 * Changed "lookup" to "get" just because
* Added copyright notices to files
 * Added Apache 2.0 License file with permission from Kresten/Trifork
 * Changed the handle from "Db" to "Tree" because... it made me feel better
 * Other minor changes here and there
2012-04-15 10:35:39 -04:00
Kresten Krab Thorup
afec223f03 Give range query test some more time... 2012-01-23 00:49:43 +01:00
Jesper Louis Andersen
363e94c3cf Implement sync_fold_range as part of the test. 2012-01-22 13:10:34 +01:00
Jesper Louis Andersen
e61f80f4e0 Do not clean up trees twice. Once is enough. 2012-01-22 13:10:33 +01:00
Jesper Louis Andersen
bb17564d9c Make the sync_range call test work.
Currently, we are also synchronizing all the key collection in the
call. But in the future we might want to interleave that with other
operations.
2012-01-21 21:16:24 +01:00
Jesper Louis Andersen
e00378639b Build a record for the trees.
This is a needed step to support range-queries since we may collect
range queries at a later time, interleaved with the normal operations.
2012-01-21 15:15:19 +01:00
Kresten Krab Thorup
c26e0695c5 Finish renaming lsm_btree_merger2 2012-01-20 10:06:43 +01:00
Kresten Krab Thorup
f56f530d7a Add both sync and async range fold
Sync blocks insert/lookup while doing a range
query, but still buffers the results in a
per-range query process.  

Async fold runs on a hard link copy of the
underlying tree data.

This commit and also fixes a number of bugs 
related to folding; it was not taking nursery 
data into account.
2012-01-19 14:25:47 +01:00
Kresten Krab Thorup
3ddfd97aea Close trees before cleanup
Problem is that we sometimes get errors resulting
from files being written as a result of pending
merges.  Closing a tree should stop all such
file-level activity.
2012-01-19 14:15:46 +01:00
Kresten Krab Thorup
29d1493415 Rename lsm_btree:range/3 to lsm_btree:async_range/3 2012-01-16 15:13:47 +01:00
Kresten Krab Thorup
771d18f9f7 Implement lsm_btree:fold_range/5
First implementation of range fold

Range folding doesn't prohibit insert/lookup or
merge operations, but each level can only have
one range fold operation active.

Thus, worst case active range folds can double
space requirements, because it holds hard-linked
copies of used btree files.
2012-01-16 00:37:52 +01:00
Jesper Louis Andersen
793f8e3a3a Optimize open dict check.
A dict is open and with keys if its size is greater than 0. Go through
the dicts one by one with lists:any/2 and use that to optimize the
check. Ought to run faster than traversing the full set.
2012-01-08 00:01:18 +01:00
Jesper Louis Andersen
60af669400 Implement failing key lookup.
We generate a set of names that are highly unlikely to be in the tree
as well because this makes it way easier for the ?SUCHTHAT macro to
succeed.
2012-01-07 23:35:27 +01:00
Jesper Louis Andersen
c8b9a6183f Work on failing keys. Optimize generator.
To make failing keys work we must be able to produce a key in fewer
failures then currently. So encode the picker for non-empty trees
directly so it is much faster and doesn't try to do it by generating a
case and then asking "is this one good enough?". A simple
dict:filter/2 does it.
2012-01-07 22:58:38 +01:00
Jesper Louis Andersen
6b8683bb08 Implement failing lookups in the driver. 2012-01-07 22:57:01 +01:00
Kresten Krab Thorup
15736dd82a Rename modules fractal_btree -> lsm_btree 2012-01-07 17:17:48 +01:00
Kresten Krab Thorup
db2399ee4a Rename fractal_btree -> lsm_btree, phase I 2012-01-07 17:14:52 +01:00
Kresten Krab Thorup
1feef35d33 Add option to test with 'TRIQ' or 'PROPER' 2012-01-07 15:44:31 +01:00
Kresten Krab Thorup
03350aa096 Add close to shame tests 2012-01-07 15:16:57 +01:00
Jesper Louis Andersen
84d4b56779 test_tree_simple_2: correctly close down the fractal Btree. 2012-01-07 14:21:38 +01:00
Jesper Louis Andersen
b99a206494 Restructure file, add deletion.
A refactoring run made the code more digestible. Also add the needed
clauses for handling random deletion.
2012-01-07 12:44:07 +01:00
Jesper Louis Andersen
c80d7d1a6a Add deletion support to the driver. 2012-01-07 12:44:07 +01:00