Commit 5fad7d0b authored by Yoni Fogel's avatar Yoni Fogel

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
parent c6875ae9
......@@ -1999,7 +1999,7 @@ static inline void brt_cursor_cleanup(BRT_CURSOR cursor) {
dbt_cleanup(&cursor->val);
}
static inline int brt_cursor_not_set(BRT_CURSOR cursor) {
inline int brt_cursor_not_set(BRT_CURSOR cursor) {
return cursor->key.data == 0 || cursor->val.data == 0;
}
......
......@@ -206,6 +206,12 @@ void test(u_int32_t dup_flags) {
close_dbs();
/* ********************************************************************** */
setup_dbs(dup_flags);
put(TRUE, 'a', 1, 1);
early_abort('a');
cget(TRUE, FALSE, 'b', 1, 1);
close_dbs();
/* ********************************************************************** */
setup_dbs(dup_flags);
cget(TRUE, FALSE, 'a', 1, 1);
cget(TRUE, FALSE, 'b', 1, 1);
put(FALSE, 'a', 1, 1);
......@@ -222,6 +228,6 @@ void test(u_int32_t dup_flags) {
int main() {
test(0);
test(DB_DUP | DB_DUPSORT);
// test(DB_DUP | DB_DUPSORT);
return 0;
}
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment