Commit graph

454 commits

Author SHA1 Message Date
Rich Prohaska
092ecc9d7d test behavour of DB_GET_BOTH_RANGE. closes #370
git-svn-id: file:///svn/tokudb@2225 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-09 21:06:47 +00:00
Rich Prohaska
decc8bdd90 check for definition of zero length. addresses #367
git-svn-id: file:///svn/tokudb@2219 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-09 12:13:51 +00:00
Yoni Fogel
8f7507a8e1 Addresses #350
Restored the DUPSORT version of the tests for the lock txn test.

git-svn-id: file:///svn/tokudb@2211 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-09 00:00:39 +00:00
Yoni Fogel
5fad7d0bbd Addresses #350
DB->get, DB->pget, DBC->c_get, DBC->c_pget almost done.
Remainder: associated dbs need DBC->c_del and DB->del to lock properly.
Rest is done.

Associated dbs (using any of the above calls) may get stuck half way due to locking.
We are not currently optimizing for them, but it will lock everything necessary
(Once DB->del and DB->c_del lock properly)

Some tests are written, but not all of them.

Currently test_db_txn_locks.c fails due to abort not working properly.


git-svn-id: file:///svn/tokudb@2210 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-09 00:00:02 +00:00
Bradley C. Kuszmaul
6eca43dde5 Bump log_code.c test coverage to 54% by putting a call to tdb_logprint into the Makefile. Addresses #369.
git-svn-id: file:///svn/tokudb@2208 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-08 22:41:47 +00:00
Bradley C. Kuszmaul
b4537afb5f Make test_log5 use set_lk_max_locks. Addresses #366.
git-svn-id: file:///svn/tokudb@2207 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-08 22:39:40 +00:00
Bradley C. Kuszmaul
922f0b8b0a Make DB_ENV->set_lk_max_locks work. And test it. Fixes #366.
git-svn-id: file:///svn/tokudb@2205 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-08 22:14:15 +00:00
Bradley C. Kuszmaul
726ea454ba Give up on valgrind for bdb. Addresses #328.
git-svn-id: file:///svn/tokudb@2204 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-08 22:12:37 +00:00
Yoni Fogel
5abb302d65 Addresses #367
Test that shows bug described in 367, data = key = (NULL,0)
is not supported by our cursor implementations.

git-svn-id: file:///svn/tokudb@2203 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-08 21:43:25 +00:00
Yoni Fogel
31cfeaf166 Addresses #350
Effectively eliminated 'non cursor' gets.
Internally (in brt) all gets were cursor gets already.
To save future locking code, and reduce complexity of ydb,
all DB->get calls use cursor gets as subfunctions.

git-svn-id: file:///svn/tokudb@2195 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-08 19:06:39 +00:00
Yoni Fogel
a53ca2c75e Addresses #350
Only uses lock tree if both txns and locking system are enabled.
If TXN only is enabled, it implies only one txn at a time: no lock tree needed.
If LOCK only is enabled, it implies no txns, therefore only ephemeral locks needed (lock tree not needed)
If neither are enabled, clearly lock tree is not needed.

git-svn-id: file:///svn/tokudb@2193 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-08 18:40:36 +00:00
Yoni Fogel
0f39ff8a04 Addresses #350
Fixed some bugs in test_db_txn_locks
to port it over to BDB.

git-svn-id: file:///svn/tokudb@2192 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-08 18:28:43 +00:00
Yoni Fogel
e8a6e94d10 Addresses #350
Bugfix with releasing locks/unlocking a transaction.

DBC->c_get (DB_SET)
and DB->put (DB_YESOVERWRITE) now perform locking
Secondary dbs not included (behavior unknown).

Several tests added for c_get (DB_SET) and DB->put(DB_YESOVERWRITE).

Lock tree only created if INIT_TXN is enabled during env creation.


git-svn-id: file:///svn/tokudb@2191 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-08 18:00:26 +00:00
Yoni Fogel
4b9a134152 Port to OSX for some tests.
git-svn-id: file:///svn/tokudb@2187 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-08 15:16:33 +00:00
Yoni Fogel
7ba48c085f standardized naming of a test.
git-svn-id: file:///svn/tokudb@2186 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-08 15:01:17 +00:00
Yoni Fogel
113b1e094e Modified test-weakxaction.c to work with tokudb.
Test does not yet pass due to locking not fully implemented.

git-svn-id: file:///svn/tokudb@2171 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-08 05:24:29 +00:00
Rich Prohaska
7d28f43da1 put toku_assert.o into libdb.so. addresses #354
git-svn-id: file:///svn/tokudb@2155 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-07 17:12:36 +00:00
Yoni Fogel
6644073d36 Addresses 293
Bugfix with toku_lt_set_txn_add_lt_callback
Had the error case backwards.

git-svn-id: file:///svn/tokudb@2142 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-07 04:39:18 +00:00
Yoni Fogel
ce5b3e6465 Addresses #350
Integrated lock tree into the transactions.
    Allocated on create
    unlocked on abort/commit
    transaction keeps track of which lock trees it owns locks in
Started working on integrating c_get functions.
Modified locktree API to make it easier to use both dupsort and nondup dbs
Fixed tests to work with new locktree API.

git-svn-id: file:///svn/tokudb@2140 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-06 23:05:36 +00:00
Yoni Fogel
1e2aaf51c9 Addresses #346
Modified svn:ignore properties to ignore unneeded information.

git-svn-id: file:///svn/tokudb@2136 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-06 20:04:19 +00:00
Bradley C. Kuszmaul
fe11eae49a Try to recover with deletes. Addresses #27.
git-svn-id: file:///svn/tokudb@2133 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-06 19:28:01 +00:00
Yoni Fogel
01d51167d6 Bugfix in tests makefile.
git-svn-id: file:///svn/tokudb@2131 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-06 19:10:47 +00:00
Yoni Fogel
55191e5757 Addresses #307 Addresses #293
Modified makefiles to clean up install process
Added tests
Added hash table to store list of db's that a tx has access to.

git-svn-id: file:///svn/tokudb@2130 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-06 19:05:38 +00:00
Vincenzo Liberatore
b28b82a1e1 Addresses #337
Adds tests for write lock

git-svn-id: file:///svn/tokudb@2129 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-06 18:31:34 +00:00
Yoni Fogel
834cc7892b Addresses #293 Addresses #307
Addresses #337
Makefile modifications, test modifications,
Lock tree is better integraded with db.

git-svn-id: file:///svn/tokudb@2126 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-06 17:23:38 +00:00
Vincenzo Liberatore
3a39aebe1f Addresses #337
Fixes the tests with a bound on the number of ranges, and fixes a bug
in lock tree unlock

git-svn-id: file:///svn/tokudb@2125 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-06 17:11:12 +00:00
Yoni Fogel
7b793edcee Addresses #288
Added test of get_size to get code coverage again to 100%

git-svn-id: file:///svn/tokudb@2124 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-06 16:27:17 +00:00
Yoni Fogel
2051f5180d git-svn-id: file:///svn/tokudb@2123 c7de825b-a66e-492c-adef-691d508d4ae1 2008-02-06 16:24:44 +00:00
Yoni Fogel
d67059511a Closes #343
Lock tree freed during db->close.

git-svn-id: file:///svn/tokudb@2122 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-06 16:20:55 +00:00
Rich Prohaska
22edd66d28 fix some global namespace pollution
git-svn-id: file:///svn/tokudb@2118 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-06 13:37:52 +00:00
Rich Prohaska
7060ecd11c clean .ofiles
git-svn-id: file:///svn/tokudb@2108 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-06 02:22:05 +00:00
Vincenzo Liberatore
57009d09e6 Addresses #337
Modify test cases to support lock bound

git-svn-id: file:///svn/tokudb@2106 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-05 22:40:05 +00:00
Yoni Fogel
7a29120fdc Addresses #337
Addresses #293
Addresses #307
Adds range count to limit lock system memory from the dbenv, and correspondingly changes range trees and test files

git-svn-id: file:///svn/tokudb@2103 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-05 22:28:11 +00:00
Bradley C. Kuszmaul
54fe4c77d7 Stop valgrind for some more bdb tests. Addresses #328.
git-svn-id: file:///svn/tokudb@2097 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-05 18:20:16 +00:00
Rich Prohaska
76dfee1b0e closes #331
git-svn-id: file:///svn/tokudb@2084 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-05 01:56:21 +00:00
Rich Prohaska
ea0ef57332 fix the env->set_data_dir db->open create bug. need to look at the errno if a unix system call fails. addresses #331
git-svn-id: file:///svn/tokudb@2083 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-05 01:01:28 +00:00
Vincenzo Liberatore
1971e2c12b Addresses #293
Addresses #307
Fixed failure conditions in sweep borders

git-svn-id: file:///svn/tokudb@2082 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-04 22:02:26 +00:00
Vincenzo Liberatore
d283051af7 Addresses #293
Addresses #307
Fixed the condition under which the border sweep would fail.


git-svn-id: file:///svn/tokudb@2081 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-04 21:55:16 +00:00
Vincenzo Liberatore
5762a74d90 Addresses #293
Addresses #307
Beautifies Makefile in tests. Fixes initialization of hash table scanning.


git-svn-id: file:///svn/tokudb@2080 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-04 21:14:52 +00:00
Vincenzo Liberatore
1154857408 Addresses #293
Addresses #307
Write lock tests. Bug fix on borderwrite check. 

git-svn-id: file:///svn/tokudb@2078 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-04 20:55:11 +00:00
Yoni Fogel
d1e31549d4 Addresses #307
Added test cases for the hashtable.
Now has 100% line and branch coverage of hashtable except for asserts.

git-svn-id: file:///svn/tokudb@2077 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-04 17:16:45 +00:00
Rich Prohaska
d6249b2679 implement DB_CURRENT_BINDING, an operation that returns the current cursor kv binding even if deleted. closes #274
git-svn-id: file:///svn/tokudb@2063 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-03 18:26:01 +00:00
Yoni Fogel
30a66896c0 Addresses #329
Addresses #293
Addresses #307

Finished code and integration of rangetree hashtable and lock tree.
All tests pass now (although tests have not yet been written for the hashtable).

git-svn-id: file:///svn/tokudb@2045 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-02 02:06:22 +00:00
Yoni Fogel
463245e8d8 Addresses #293
Addresses #329
Combined rangetree hashtables and the lock tree.

git-svn-id: file:///svn/tokudb@2044 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-02 01:12:44 +00:00
Yoni Fogel
bcc562a931 Addresses #329
Moved hash_tables to the lock tree dir

git-svn-id: file:///svn/tokudb@2042 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-02 00:24:31 +00:00
Yoni Fogel
b3da3a650b Addresses #329
Most of the implementation of the range tree hash table

git-svn-id: file:///svn/tokudb@2041 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-02 00:23:53 +00:00
Vincenzo Liberatore
f845e1f299 Addresses #329
Header file

git-svn-id: file:///svn/tokudb@2040 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-01 22:56:05 +00:00
Yoni Fogel
9ce2359f89 Added hash table
git-svn-id: file:///svn/tokudb@2039 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-01 21:52:10 +00:00
Vincenzo Liberatore
f30467d30f Addresses #293
Implements unlock

git-svn-id: file:///svn/tokudb@2038 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-01 21:35:39 +00:00
Yoni Fogel
2db8ca6af8 Addresses #293
Addresses #307
Replaced unsigned with u_int32_t
Also one bugfix with incorrect assert.
Made all tests run properly (bugs were mostly in the test).

git-svn-id: file:///svn/tokudb@2035 c7de825b-a66e-492c-adef-691d508d4ae1
2008-02-01 19:26:13 +00:00