mirror of https://gitee.com/bigwinds/arangodb
code unification
This commit is contained in:
parent
6233780862
commit
f634b1aff0
|
@ -81,7 +81,7 @@ static TRI_aql_collection_t* CreateCollectionContainer (const char* const name)
|
|||
assert(name);
|
||||
|
||||
collection = (TRI_aql_collection_t*) TRI_Allocate(TRI_UNKNOWN_MEM_ZONE, sizeof(TRI_aql_collection_t), false);
|
||||
if (!collection) {
|
||||
if (collection == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -412,7 +412,7 @@ void TRI_FreeTransactionContext (TRI_transaction_context_t* const context) {
|
|||
}
|
||||
TRI_DestroyAssociativePointer(&context->_collections);
|
||||
|
||||
// destroy mutexts
|
||||
// destroy mutexes
|
||||
TRI_DestroyMutex(&context->_lock);
|
||||
TRI_DestroyMutex(&context->_collectionLock);
|
||||
|
||||
|
@ -590,7 +590,6 @@ static int AcquireCollectionLocks (TRI_transaction_t* const trx) {
|
|||
context = trx->_context;
|
||||
|
||||
n = trx->_collections._length;
|
||||
assert(n > 0);
|
||||
|
||||
// process collections in forward order
|
||||
for (i = 0; i < n; ++i) {
|
||||
|
@ -852,7 +851,6 @@ static int RegisterTransaction (TRI_transaction_t* const trx) {
|
|||
int res;
|
||||
|
||||
assert(trx->_status == TRI_TRANSACTION_CREATED);
|
||||
assert(trx->_collections._length > 0);
|
||||
|
||||
context = trx->_context;
|
||||
|
||||
|
@ -1161,10 +1159,6 @@ int TRI_StartTransaction (TRI_transaction_t* const trx, TRI_transaction_hint_t h
|
|||
|
||||
assert(trx->_status == TRI_TRANSACTION_CREATED);
|
||||
|
||||
if (trx->_collections._length == 0) {
|
||||
return TRI_ERROR_TRANSACTION_INCOMPLETE;
|
||||
}
|
||||
|
||||
trx->_hints = hints;
|
||||
|
||||
res = AcquireCollectionLocks(trx);
|
||||
|
|
Loading…
Reference in New Issue