From 12b3b561b0215ea6018d94bb693535447cd77a9a Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Thu, 11 Jan 2024 15:29:22 +0000 Subject: Remove assert that does not hold if alignment is changed. The assert provides not added value. --- searchlib/src/vespa/searchlib/common/bitvector.cpp | 1 - searchlib/src/vespa/searchlib/diskindex/bitvectordictionary.cpp | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'searchlib') diff --git a/searchlib/src/vespa/searchlib/common/bitvector.cpp b/searchlib/src/vespa/searchlib/common/bitvector.cpp index 598bc01da9a..f9f62087560 100644 --- a/searchlib/src/vespa/searchlib/common/bitvector.cpp +++ b/searchlib/src/vespa/searchlib/common/bitvector.cpp @@ -388,7 +388,6 @@ void MMappedBitVector::read(Index numberOfElements, FastOS_FileInterface &file, int64_t offset, Index doccount) { - assert((offset & (getAlignment() - 1)) == 0); void *mapptr = file.MemoryMapPtr(offset); assert(mapptr != nullptr); if (mapptr != nullptr) { diff --git a/searchlib/src/vespa/searchlib/diskindex/bitvectordictionary.cpp b/searchlib/src/vespa/searchlib/diskindex/bitvectordictionary.cpp index 055336c37c6..5f001b20dda 100644 --- a/searchlib/src/vespa/searchlib/diskindex/bitvectordictionary.cpp +++ b/searchlib/src/vespa/searchlib/diskindex/bitvectordictionary.cpp @@ -94,7 +94,8 @@ BitVectorDictionary::lookup(uint64_t wordNum) return {}; } int64_t pos = &*itr - &_entries[0]; - return BitVector::create(_docIdLimit, *_datFile, ((int64_t) _vectorSize) * pos + _datHeaderLen, itr->_numDocs); + int64_t offset = ((int64_t) _vectorSize) * pos + _datHeaderLen; + return BitVector::create(_docIdLimit, *_datFile, offset, itr->_numDocs); } } -- cgit v1.2.3