Commit ca0865e5 authored by Yoni Fogel's avatar Yoni Fogel

Addresses #1603 Rollback of a bug introduced.

Do not compare idx and index in remove_txn and remove_brt.  idx is from the iterating OMT and index is from the other OMT.
There is no reason they should match, therefore do not assert that they should

git-svn-id: file:///svn/toku/tokudb@11164 c7de825b-a66e-492c-adef-691d508d4ae1
parent abb505fa
...@@ -1134,7 +1134,7 @@ int toku_txn_note_brt (TOKUTXN txn, BRT brt) { ...@@ -1134,7 +1134,7 @@ int toku_txn_note_brt (TOKUTXN txn, BRT brt) {
return 0; return 0;
} }
static int remove_brt (OMTVALUE txnv, u_int32_t idx, void *brtv) { static int remove_brt (OMTVALUE txnv, u_int32_t UU(idx), void *brtv) {
TOKUTXN txn = txnv; TOKUTXN txn = txnv;
BRT brt = brtv; BRT brt = brtv;
OMTVALUE brtv_again=NULL; OMTVALUE brtv_again=NULL;
...@@ -1142,7 +1142,6 @@ static int remove_brt (OMTVALUE txnv, u_int32_t idx, void *brtv) { ...@@ -1142,7 +1142,6 @@ static int remove_brt (OMTVALUE txnv, u_int32_t idx, void *brtv) {
int r = toku_omt_find_zero(txn->open_brts, find_filenum, brt, &brtv_again, &index, NULL); int r = toku_omt_find_zero(txn->open_brts, find_filenum, brt, &brtv_again, &index, NULL);
assert(r==0); assert(r==0);
assert((void*)brtv_again==brtv); assert((void*)brtv_again==brtv);
assert(index==idx);
r = toku_omt_delete_at(txn->open_brts, index); r = toku_omt_delete_at(txn->open_brts, index);
assert(r==0); assert(r==0);
return 0; return 0;
...@@ -1154,7 +1153,7 @@ int toku_txn_note_close_brt (BRT brt) { ...@@ -1154,7 +1153,7 @@ int toku_txn_note_close_brt (BRT brt) {
return 0; return 0;
} }
static int remove_txn (OMTVALUE brtv, u_int32_t idx, void *txnv) { static int remove_txn (OMTVALUE brtv, u_int32_t UU(idx), void *txnv) {
BRT brt = brtv; BRT brt = brtv;
TOKUTXN txn = txnv; TOKUTXN txn = txnv;
OMTVALUE txnv_again=NULL; OMTVALUE txnv_again=NULL;
...@@ -1162,7 +1161,6 @@ static int remove_txn (OMTVALUE brtv, u_int32_t idx, void *txnv) { ...@@ -1162,7 +1161,6 @@ static int remove_txn (OMTVALUE brtv, u_int32_t idx, void *txnv) {
int r = toku_omt_find_zero(brt->txns, find_xid, txn, &txnv_again, &index, NULL); int r = toku_omt_find_zero(brt->txns, find_xid, txn, &txnv_again, &index, NULL);
assert(r==0); assert(r==0);
assert((void*)txnv_again==txnv); assert((void*)txnv_again==txnv);
assert(index==idx);
r = toku_omt_delete_at(brt->txns, index); r = toku_omt_delete_at(brt->txns, index);
assert(r==0); assert(r==0);
return 0; return 0;
......
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