Commit ffea58c2 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

[t:4690], cleanup case statement in cachetable.c

git-svn-id: file:///svn/toku/tokudb@44485 c7de825b-a66e-492c-adef-691d508d4ae1
parent 30370ae5
...@@ -3228,11 +3228,8 @@ log_open_txn (OMTVALUE txnv, u_int32_t UU(index), void *UU(extra)) { ...@@ -3228,11 +3228,8 @@ log_open_txn (OMTVALUE txnv, u_int32_t UU(index), void *UU(extra)) {
int r = toku_omt_iterate(txn->open_fts, set_filenum_in_array, array); int r = toku_omt_iterate(txn->open_fts, set_filenum_in_array, array);
assert(r==0); assert(r==0);
} }
// Zardosht claims that COMMITTING, ABORTING and RETIRED can never happen because of the multi-operation lock.
switch (toku_txn_get_state(txn)) { switch (toku_txn_get_state(txn)) {
case TOKUTXN_LIVE: case TOKUTXN_LIVE:{
case TOKUTXN_COMMITTING:
case TOKUTXN_ABORTING: {
int r = toku_log_xstillopen(logger, NULL, 0, int r = toku_log_xstillopen(logger, NULL, 0,
toku_txn_get_txnid(txn), toku_txn_get_txnid(txn),
toku_txn_get_txnid(toku_logger_txn_parent(txn)), toku_txn_get_txnid(toku_logger_txn_parent(txn)),
...@@ -3265,7 +3262,10 @@ log_open_txn (OMTVALUE txnv, u_int32_t UU(index), void *UU(extra)) { ...@@ -3265,7 +3262,10 @@ log_open_txn (OMTVALUE txnv, u_int32_t UU(index), void *UU(extra)) {
return 0; return 0;
} }
case TOKUTXN_RETIRED: case TOKUTXN_RETIRED:
return 0; case TOKUTXN_COMMITTING:
case TOKUTXN_ABORTING: {
assert(0);
}
} }
// default is an error // default is an error
assert(0); assert(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