summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2014-10-17 07:46:30 -0400
committerKeith Bostic <keith@wiredtiger.com>2014-10-17 07:46:30 -0400
commit7590319f16c8ef44431ecc116dfd3c8b69dfcac6 (patch)
treebadc045a50b34b476acca4e1f4ee0d570c660168 /api
parentb063e91fb4ac65c8e24a9387f00f6e13b591b661 (diff)
downloadmongo-7590319f16c8ef44431ecc116dfd3c8b69dfcac6.tar.gz
Rename WT_DEADLOCK to WT_ROLLBACK, reference #1204.
Diffstat (limited to 'api')
-rw-r--r--api/leveldb/leveldb_wt.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/api/leveldb/leveldb_wt.cc b/api/leveldb/leveldb_wt.cc
index 6425a5a8dfd..8fc7d1ca092 100644
--- a/api/leveldb/leveldb_wt.cc
+++ b/api/leveldb/leveldb_wt.cc
@@ -93,8 +93,6 @@ Status WiredTigerErrorToStatus(int wiredTigerError, const char *msg) {
return Status::NotFound(Slice(msg));
else if (wiredTigerError == WT_ERROR || wiredTigerError == WT_PANIC)
return Status::Corruption(Slice(msg));
- else if (wiredTigerError == WT_DEADLOCK)
- return Status::IOError("DEADLOCK"); // TODO: Is this the best translation?
else if (wiredTigerError == ENOTSUP)
return Status::NotSupported(Slice(msg));
else if (wiredTigerError == EINVAL)
@@ -103,6 +101,8 @@ Status WiredTigerErrorToStatus(int wiredTigerError, const char *msg) {
wiredTigerError == EIO || wiredTigerError == EBADF ||
wiredTigerError == EEXIST || wiredTigerError == ENOSPC)
return Status::IOError(Slice(msg));
+ else if (wiredTigerError == WT_ROLLBACK)
+ return Status::IOError("ROLLBACK"); // TODO: Is this the best translation?
else
return Status::Corruption(Slice(msg));
}
@@ -395,7 +395,7 @@ DbImpl::Write(const WriteOptions& options, WriteBatch* updates)
throw;
}
#endif
- if (!status.ok() || (ret = handler.GetWiredTigerStatus()) != WT_DEADLOCK)
+ if (!status.ok() || (ret = handler.GetWiredTigerStatus()) != WT_ROLLBACK)
break;
// Roll back the transaction on deadlock so we can try again
if (need_txn && (ret = session->rollback_transaction(session, NULL)) != 0) {