mirror of https://gitee.com/bigwinds/arangodb
negate condition for iterate markers
This commit is contained in:
parent
6f3b4725f6
commit
40445d973e
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include "datafile.h"
|
||||
|
||||
#include "BasicsC/conversions.h"
|
||||
#include "BasicsC/hashes.h"
|
||||
#include "BasicsC/logging.h"
|
||||
#include "BasicsC/memory-map.h"
|
||||
|
@ -421,6 +422,7 @@ static TRI_df_scan_t ScanDatafile (TRI_datafile_t const* datafile) {
|
|||
scan._maximalSize = datafile->_maximalSize;
|
||||
scan._numberMarkers = 0;
|
||||
scan._status = 1;
|
||||
scan._isSealed = false; // assume false
|
||||
|
||||
if (datafile->_currentSize == 0) {
|
||||
end = datafile->_data + datafile->_maximalSize;
|
||||
|
@ -494,6 +496,7 @@ static TRI_df_scan_t ScanDatafile (TRI_datafile_t const* datafile) {
|
|||
|
||||
if (marker->_type == TRI_DF_MARKER_FOOTER) {
|
||||
scan._endPosition = currentSize;
|
||||
scan._isSealed = true;
|
||||
return scan;
|
||||
}
|
||||
|
||||
|
@ -1712,6 +1715,7 @@ TRI_df_scan_t TRI_ScanDatafile (char const* path) {
|
|||
TRI_InitVector(&scan._entries, TRI_CORE_MEM_ZONE, sizeof(TRI_df_scan_entry_t));
|
||||
|
||||
scan._status = 5;
|
||||
scan._isSealed = false;
|
||||
}
|
||||
|
||||
return scan;
|
||||
|
|
|
@ -214,6 +214,7 @@ typedef struct TRI_df_scan_s {
|
|||
TRI_vector_t _entries;
|
||||
|
||||
uint32_t _status;
|
||||
bool _isSealed;
|
||||
}
|
||||
TRI_df_scan_t;
|
||||
|
||||
|
|
|
@ -803,7 +803,7 @@ static int OpenDatabases (TRI_server_t* server,
|
|||
databaseName,
|
||||
&defaults,
|
||||
isUpgrade,
|
||||
server->_wasShutdownCleanly);
|
||||
! server->_wasShutdownCleanly);
|
||||
|
||||
TRI_FreeString(TRI_CORE_MEM_ZONE, databaseName);
|
||||
|
||||
|
@ -1863,6 +1863,7 @@ int TRI_StartServer (TRI_server_t* server,
|
|||
return TRI_ERROR_INTERNAL;
|
||||
}
|
||||
|
||||
|
||||
server->_wasShutdownCleanly = (res == TRI_ERROR_NO_ERROR);
|
||||
|
||||
|
||||
|
|
|
@ -1104,7 +1104,7 @@ static int LoadCollectionVocBase (TRI_vocbase_t* vocbase,
|
|||
// release the lock on the collection temporarily
|
||||
// this will allow other threads to check the collection's
|
||||
// status while it is loading (loading may take a long time because of
|
||||
// disk activity)
|
||||
// disk activity, index creation etc.)
|
||||
TRI_WRITE_UNLOCK_STATUS_VOCBASE_COL(collection);
|
||||
|
||||
document = TRI_OpenDocumentCollection(vocbase, collection->_path);
|
||||
|
|
Loading…
Reference in New Issue