summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-01-11 15:29:22 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2024-01-11 15:29:22 +0000
commit12b3b561b0215ea6018d94bb693535447cd77a9a (patch)
treec1145759132297dd826fb1835d62d1909727a8f4 /searchlib
parente10bd9d52cbfd8a67a355b6c529d75aff4952576 (diff)
Remove assert that does not hold if alignment is changed. The assert provides not added value.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/common/bitvector.cpp1
-rw-r--r--searchlib/src/vespa/searchlib/diskindex/bitvectordictionary.cpp3
2 files changed, 2 insertions, 2 deletions
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);
}
}