Implements DB->pre_acquire_table_lock
Also optimized lock tree for table write locks
git-svn-id: file:///svn/tokudb@4480 c7de825b-a66e-492c-adef-691d508d4ae1
Addresses #554
When lock trees close before transactions do (that touch them), we can crash
or have memory corruption.
Now, when lock trees close, they alert all transactions that they have disappeared.
git-svn-id: file:///svn/tokudb@2974 c7de825b-a66e-492c-adef-691d508d4ae1
'Lock tree manager' object created to hold data shared by all lock trees
i.e. Current number of locks (per env) and max locks (per env)
Uses functions to change max_locks.
Added tests for lock tree manager.
git-svn-id: file:///svn/tokudb@2948 c7de825b-a66e-492c-adef-691d508d4ae1
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
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
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
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
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
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
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
- Lock tree takes parameter of a db panic function, defers to it in panic
situations.
- Code reorganization due to code reviews
- DBT consistency is assumed (should be EINVAL at higher level)
git-svn-id: file:///svn/tokudb@1971 c7de825b-a66e-492c-adef-691d508d4ae1
Addresses #307
Locktree now accepts max memory parameter.
This counts only 'toku_points' and payloads.
Whenever it goes over the allowed memory, it will return ENOMEM as
BDB does.
Tests were only updated to compile correctly (and return EINVAL
if max size is 0).
Tests do not yet test whether the max memory system works.
git-svn-id: file:///svn/tokudb@1954 c7de825b-a66e-492c-adef-691d508d4ae1
Start the documentation of lock trees, at this point, mostly for
our own education and understanding
git-svn-id: file:///svn/tokudb@1912 c7de825b-a66e-492c-adef-691d508d4ae1
Renamed some accessor functions and made them nonstatic
so that the test programs can access them.
Allocated the fake selfread/selfwrite trees in the
function that requests them (and creates if necessary) instead of
toku_lt_create
git-svn-id: file:///svn/tokudb@1895 c7de825b-a66e-492c-adef-691d508d4ae1
Checkpoint in lock tree implementation.
Write locks and point locks appear to be done,
bugs fixed in comparison function.
Need to do a bunch of worst case error handling still.
git-svn-id: file:///svn/tokudb@1830 c7de825b-a66e-492c-adef-691d508d4ae1