Addresses #1862 refs[t:1862] Return rollback to use standard messages (accidentally set it to mega-abort/mega-commit in r1862)

git-svn-id: file:///svn/toku/tokudb@14713 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
Yoni Fogel 2013-04-16 23:58:02 -04:00
parent bca71dc119
commit 5f488b2b42

View file

@ -98,15 +98,8 @@ static int do_nothing_with_filenum(TOKUTXN txn, FILENUM filenum) {
int toku_commit_cmdinsert (FILENUM filenum, BYTESTRING key, TOKUTXN txn, YIELDF UU(yield), void *UU(yieldv), LSN oplsn) { int toku_commit_cmdinsert (FILENUM filenum, BYTESTRING key, TOKUTXN txn, YIELDF UU(yield), void *UU(yieldv), LSN oplsn) {
static TXNID last_xid;
static FILENUM last_filenum;
if (txn->txnid64 == last_xid && last_filenum.fileid == filenum.fileid)
return 0;
last_xid = txn->txnid64;
last_filenum = filenum;
#if TOKU_DO_COMMIT_CMD_INSERT #if TOKU_DO_COMMIT_CMD_INSERT
return do_insertion (BRT_COMMIT_BROADCAST_TXN, filenum, key, 0, txn, oplsn); return do_insertion (BRT_COMMIT_ANY, filenum, key, 0, txn, oplsn);
#else #else
key = key; oplsn = oplsn; key = key; oplsn = oplsn;
return do_nothing_with_filenum(txn, filenum); return do_nothing_with_filenum(txn, filenum);
@ -122,15 +115,8 @@ toku_commit_cmdinsertboth (FILENUM filenum,
void * UU(yieldv), void * UU(yieldv),
LSN oplsn) LSN oplsn)
{ {
static TXNID last_xid;
static FILENUM last_filenum;
if (txn->txnid64 == last_xid && last_filenum.fileid == filenum.fileid)
return 0;
last_xid = txn->txnid64;
last_filenum = filenum;
#if TOKU_DO_COMMIT_CMD_INSERT #if TOKU_DO_COMMIT_CMD_INSERT
return do_insertion (BRT_COMMIT_BROADCAST_TXN, filenum, key, &data, txn, oplsn); return do_insertion (BRT_COMMIT_BOTH, filenum, key, &data, txn, oplsn);
#else #else
key = key; data = data; oplsn = oplsn; key = key; data = data; oplsn = oplsn;
return do_nothing_with_filenum(txn, filenum); return do_nothing_with_filenum(txn, filenum);
@ -145,14 +131,7 @@ toku_rollback_cmdinsert (FILENUM filenum,
void * UU(yieldv), void * UU(yieldv),
LSN oplsn) LSN oplsn)
{ {
static TXNID last_xid; return do_insertion (BRT_ABORT_ANY, filenum, key, 0, txn, oplsn);
static FILENUM last_filenum;
if (txn->txnid64 == last_xid && last_filenum.fileid == filenum.fileid)
return 0;
last_xid = txn->txnid64;
last_filenum = filenum;
return do_insertion (BRT_ABORT_BROADCAST_TXN, filenum, key, 0, txn, oplsn);
} }
int int
@ -164,14 +143,7 @@ toku_rollback_cmdinsertboth (FILENUM filenum,
void * UU(yieldv), void * UU(yieldv),
LSN oplsn) LSN oplsn)
{ {
static TXNID last_xid; return do_insertion (BRT_ABORT_BOTH, filenum, key, &data, txn, oplsn);
static FILENUM last_filenum;
if (txn->txnid64 == last_xid && last_filenum.fileid == filenum.fileid)
return 0;
last_xid = txn->txnid64;
last_filenum = filenum;
return do_insertion (BRT_ABORT_BROADCAST_TXN, filenum, key, &data, txn, oplsn);
} }
int int
@ -183,15 +155,8 @@ toku_commit_cmddeleteboth (FILENUM filenum,
void * UU(yieldv), void * UU(yieldv),
LSN oplsn) LSN oplsn)
{ {
static TXNID last_xid;
static FILENUM last_filenum;
if (txn->txnid64 == last_xid && last_filenum.fileid == filenum.fileid)
return 0;
last_xid = txn->txnid64;
last_filenum = filenum;
#if TOKU_DO_COMMIT_CMD_DELETE_BOTH #if TOKU_DO_COMMIT_CMD_DELETE_BOTH
return do_insertion (BRT_COMMIT_BROADCAST_TXN, filenum, key, &data, txn, oplsn); return do_insertion (BRT_COMMIT_BOTH, filenum, key, &data, txn, oplsn);
#else #else
xid = xid; key = key; data = data; xid = xid; key = key; data = data;
return do_nothing_with_filenum(txn, filenum); return do_nothing_with_filenum(txn, filenum);
@ -207,14 +172,7 @@ toku_rollback_cmddeleteboth (FILENUM filenum,
void * UU(yieldv), void * UU(yieldv),
LSN oplsn) LSN oplsn)
{ {
static TXNID last_xid; return do_insertion (BRT_ABORT_BOTH, filenum, key, &data, txn, oplsn);
static FILENUM last_filenum;
if (txn->txnid64 == last_xid && last_filenum.fileid == filenum.fileid)
return 0;
last_xid = txn->txnid64;
last_filenum = filenum;
return do_insertion (BRT_ABORT_BROADCAST_TXN, filenum, key, &data, txn, oplsn);
} }
int int
@ -225,15 +183,8 @@ toku_commit_cmddelete (FILENUM filenum,
void * UU(yieldv), void * UU(yieldv),
LSN oplsn) LSN oplsn)
{ {
static TXNID last_xid;
static FILENUM last_filenum;
if (txn->txnid64 == last_xid && last_filenum.fileid == filenum.fileid)
return 0;
last_xid = txn->txnid64;
last_filenum = filenum;
#if TOKU_DO_COMMIT_CMD_DELETE #if TOKU_DO_COMMIT_CMD_DELETE
return do_insertion (BRT_COMMIT_BROADCAST_TXN, filenum, key, 0, txn, oplsn); return do_insertion (BRT_COMMIT_ANY, filenum, key, 0, txn, oplsn);
#else #else
xid = xid; key = key; xid = xid; key = key;
return do_nothing_with_filenum(txn, filenum); return do_nothing_with_filenum(txn, filenum);
@ -248,14 +199,7 @@ toku_rollback_cmddelete (FILENUM filenum,
void * UU(yieldv), void * UU(yieldv),
LSN oplsn) LSN oplsn)
{ {
static TXNID last_xid; return do_insertion (BRT_ABORT_ANY, filenum, key, 0, txn, oplsn);
static FILENUM last_filenum;
if (txn->txnid64 == last_xid && last_filenum.fileid == filenum.fileid)
return 0;
last_xid = txn->txnid64;
last_filenum = filenum;
return do_insertion (BRT_ABORT_BROADCAST_TXN, filenum, key, 0, txn, oplsn);
} }
int int