mirror of https://gitee.com/bigwinds/arangodb
less lock
This commit is contained in:
parent
e8ab1c6b38
commit
a7c1ee0191
|
@ -366,7 +366,7 @@ void RestReplicationHandler::handleCommandInventory () {
|
|||
TRI_voc_tick_t tick = TRI_CurrentTickVocBase();
|
||||
|
||||
// collections
|
||||
TRI_json_t* collections = TRI_ParametersCollectionsVocBase(_vocbase, tick, &filterCollection, NULL);
|
||||
TRI_json_t* collections = TRI_InventoryCollectionsVocBase(_vocbase, tick, &filterCollection, NULL);
|
||||
|
||||
TRI_replication_log_state_t state;
|
||||
|
||||
|
|
|
@ -570,7 +570,7 @@ static bool StringifyDocumentOperation (TRI_string_buffer_t* buffer,
|
|||
TRI_voc_rid_t oldRev;
|
||||
TRI_voc_rid_t rid;
|
||||
|
||||
if (! TRI_ReserveStringBuffer(buffer, 256)) {
|
||||
if (TRI_ReserveStringBuffer(buffer, 256) != TRI_ERROR_NO_ERROR) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1218,16 +1218,8 @@ static int LoadCollectionVocBase (TRI_vocbase_t* vocbase,
|
|||
if (TRI_IS_DOCUMENT_COLLECTION(type)) {
|
||||
TRI_document_collection_t* document;
|
||||
|
||||
#ifdef TRI_ENABLE_REPLICATION
|
||||
TRI_ReadLockReadWriteLock(&vocbase->_objectLock);
|
||||
#endif
|
||||
|
||||
document = TRI_OpenDocumentCollection(vocbase, collection->_path);
|
||||
|
||||
#ifdef TRI_ENABLE_REPLICATION
|
||||
TRI_ReadUnlockReadWriteLock(&vocbase->_objectLock);
|
||||
#endif
|
||||
|
||||
if (document == NULL) {
|
||||
collection->_status = TRI_VOC_COL_STATUS_CORRUPTED;
|
||||
|
||||
|
@ -1878,7 +1870,7 @@ TRI_vector_pointer_t TRI_CollectionsVocBase (TRI_vocbase_t* vocbase) {
|
|||
/// that there will be consistent view of collections & their properties
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
TRI_json_t* TRI_ParametersCollectionsVocBase (TRI_vocbase_t* vocbase,
|
||||
TRI_json_t* TRI_InventoryCollectionsVocBase (TRI_vocbase_t* vocbase,
|
||||
TRI_voc_tick_t maxTick,
|
||||
bool (*filter)(TRI_vocbase_col_t*, void*),
|
||||
void* data) {
|
||||
|
|
|
@ -553,7 +553,7 @@ TRI_vector_pointer_t TRI_CollectionsVocBase (TRI_vocbase_t*);
|
|||
/// and optionally indexes
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct TRI_json_s* TRI_ParametersCollectionsVocBase (TRI_vocbase_t*,
|
||||
struct TRI_json_s* TRI_InventoryCollectionsVocBase (TRI_vocbase_t*,
|
||||
TRI_voc_tick_t,
|
||||
bool (*)(TRI_vocbase_col_t*, void*),
|
||||
void*);
|
||||
|
|
Loading…
Reference in New Issue