Преглед на файлове

fix false corruption check with huge docID

related to #2090
Aleksey N. Vinogradov преди 1 година
родител
ревизия
7f4316382b
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      src/indexcheck.cpp

+ 3 - 3
src/indexcheck.cpp

@@ -1524,7 +1524,7 @@ void DiskIndexChecker_c::Impl_c::CheckDocidLookup()
 
 		for ( int i=0; i<iCpDocs; i++ )
 		{
-			DocID_t tDelta = 0;
+			uint64_t tDelta = 0;
 			DocID_t tDocID = 0;
 			RowID_t tRowID = INVALID_ROWID;
 
@@ -1536,8 +1536,8 @@ void DiskIndexChecker_c::Impl_c::CheckDocidLookup()
 			{
 				tDelta = tLookup.UnzipOffset();
 				tRowID = tLookup.GetDword();
-				if ( tDelta<0 )
-					m_tReporter.Fail ( "invalid docid delta " INT64_FMT " at row %u, checkpoint %d, doc %d, last docid " UINT64_FMT, tDocID, tRowID, iCp, i, tLastDocID );
+				if ( tDelta==0 )
+					m_tReporter.Fail ( "invalid docid delta " UINT64_FMT " at row %u, checkpoint %d, doc %d, last docid " UINT64_FMT, tDocID, tRowID, iCp, i, tLastDocID );
 				else
 					tDocID = tLastDocID + tDelta;