Commit 36ded5e2 authored by Yoni Fogel's avatar Yoni Fogel

add debugging help

git-svn-id: file:///svn/tokudb@2925 c7de825b-a66e-492c-adef-691d508d4ae1
parent 67cc2398
...@@ -36,6 +36,11 @@ static inline int toku__lt_callback(toku_lock_tree *tree, DB_TXN* txn) { ...@@ -36,6 +36,11 @@ static inline int toku__lt_callback(toku_lock_tree *tree, DB_TXN* txn) {
return tree->lock_callback ? tree->lock_callback(txn, tree) : 0; return tree->lock_callback ? tree->lock_callback(txn, tree) : 0;
} }
static void toku_breakpoint(toku_lock_tree* tree) {
assert(tree != NULL);
}
const u_int32_t __toku_default_buflen = 2; const u_int32_t __toku_default_buflen = 2;
static const DBT __toku_lt_infinity; static const DBT __toku_lt_infinity;
...@@ -1281,6 +1286,9 @@ int toku_lt_acquire_range_read_lock(toku_lock_tree* tree, DB_TXN* txn, ...@@ -1281,6 +1286,9 @@ int toku_lt_acquire_range_read_lock(toku_lock_tree* tree, DB_TXN* txn,
r = 0; r = 0;
cleanup: cleanup:
if (r == ENOMEM) {
toku_breakpoint(tree);
}
return r; return r;
} }
...@@ -1396,6 +1404,9 @@ int toku_lt_acquire_write_lock(toku_lock_tree* tree, DB_TXN* txn, ...@@ -1396,6 +1404,9 @@ int toku_lt_acquire_write_lock(toku_lock_tree* tree, DB_TXN* txn,
r = 0; r = 0;
cleanup: cleanup:
if (r == ENOMEM) {
toku_breakpoint(tree);
}
return r; return r;
} }
...@@ -1463,6 +1474,9 @@ int toku_lt_acquire_range_write_lock(toku_lock_tree* tree, DB_TXN* txn, ...@@ -1463,6 +1474,9 @@ int toku_lt_acquire_range_write_lock(toku_lock_tree* tree, DB_TXN* txn,
r = 0; r = 0;
cleanup: cleanup:
if (r == ENOMEM) {
toku_breakpoint(tree);
}
return r; return r;
} }
......
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