diff --git a/arangod/VocBase/document-collection.c b/arangod/VocBase/document-collection.c index 6361a4fd74..bb70d1246c 100644 --- a/arangod/VocBase/document-collection.c +++ b/arangod/VocBase/document-collection.c @@ -1484,15 +1484,17 @@ static bool OpenIterator (TRI_df_marker_t const* marker, void* data, TRI_datafil // update the header info UpdateHeader(datafile, marker, found, &update); update._validTo = 0; - // update the datafile info dfi = TRI_FindDatafileInfoPrimaryCollection(primary, found->_fid); if (dfi != NULL) { size_t length = LengthDataMasterPointer(found); +/* + issue #411: if we decrease here, the counts might get negative! dfi->_numberAlive -= 1; dfi->_sizeAlive -= length; +*/ dfi->_numberDead += 1; dfi->_sizeDead += length; @@ -1504,7 +1506,6 @@ static bool OpenIterator (TRI_df_marker_t const* marker, void* data, TRI_datafil dfi->_numberAlive += 1; dfi->_sizeAlive += LengthDataMasterPointer(&update); } - // update immediate indexes UpdateImmediateIndexes(collection, found, &update); }