mirror of https://gitee.com/bigwinds/arangodb
added comments
This commit is contained in:
parent
1a1c25f539
commit
3b43e0dd6e
|
@ -553,6 +553,7 @@ int TRI_LoadParameterInfoCollection (char const* path, TRI_col_info_t* parameter
|
|||
|
||||
// find parameter file
|
||||
filename = TRI_Concatenate2File(path, TRI_COL_PARAMETER_FILE);
|
||||
// TODO: memory allocation might fail
|
||||
|
||||
if (! TRI_ExistsFile(filename)) {
|
||||
TRI_FreeString(TRI_CORE_MEM_ZONE, filename);
|
||||
|
@ -864,7 +865,7 @@ TRI_collection_t* TRI_OpenCollection (TRI_vocbase_t* vocbase,
|
|||
res = TRI_LoadParameterInfoCollection(path, &info);
|
||||
|
||||
if (res != TRI_ERROR_NO_ERROR) {
|
||||
LOG_ERROR("cannot save collection parameter '%s': '%s'", path, TRI_last_error());
|
||||
LOG_ERROR("cannot load collection parameter '%s': '%s'", path, TRI_last_error());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -796,6 +796,8 @@ static int LoadCollectionVocBase (TRI_vocbase_t* vocbase, TRI_vocbase_col_t* col
|
|||
// someone else loaded the collection, release the WRITE lock and try again
|
||||
if (collection->_status == TRI_VOC_COL_STATUS_LOADED) {
|
||||
TRI_WRITE_UNLOCK_STATUS_VOCBASE_COL(collection);
|
||||
|
||||
// TODO: might this cause endless recursion in some obscure cases??
|
||||
return LoadCollectionVocBase(vocbase, collection);
|
||||
}
|
||||
|
||||
|
@ -804,6 +806,8 @@ static int LoadCollectionVocBase (TRI_vocbase_t* vocbase, TRI_vocbase_col_t* col
|
|||
if (collection->_status == TRI_VOC_COL_STATUS_UNLOADING) {
|
||||
collection->_status = TRI_VOC_COL_STATUS_LOADED;
|
||||
TRI_WRITE_UNLOCK_STATUS_VOCBASE_COL(collection);
|
||||
|
||||
// TODO: might this cause endless recursion in some obscure cases??
|
||||
return LoadCollectionVocBase(vocbase, collection);
|
||||
}
|
||||
|
||||
|
@ -829,6 +833,7 @@ static int LoadCollectionVocBase (TRI_vocbase_t* vocbase, TRI_vocbase_col_t* col
|
|||
return res;
|
||||
}
|
||||
|
||||
// TODO: might this cause endless recursion in some obscure cases??
|
||||
return LoadCollectionVocBase(vocbase, collection);
|
||||
}
|
||||
|
||||
|
@ -855,6 +860,8 @@ static int LoadCollectionVocBase (TRI_vocbase_t* vocbase, TRI_vocbase_col_t* col
|
|||
|
||||
// release the WRITE lock and try again
|
||||
TRI_WRITE_UNLOCK_STATUS_VOCBASE_COL(collection);
|
||||
|
||||
// TODO: might this cause endless recursion in some obscure cases??
|
||||
return LoadCollectionVocBase(vocbase, collection);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue