summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorTor Egge <tegge@vespa.ai>2024-01-11 16:56:39 +0100
committerGitHub <noreply@github.com>2024-01-11 16:56:39 +0100
commit416ac264739f2ea6e27557a1684ce3016fdd2c39 (patch)
tree6f00fcb54d83d4bdfa74e2a117f1cca17b08ca8c /searchlib
parent3b5c1f3ad5618bb3a981fa361e88d7ec35673582 (diff)
parent12b3b561b0215ea6018d94bb693535447cd77a9a (diff)
Merge pull request #29860 from vespa-engine/balder/remove-assert
Remove assert that does not hold if alignment is changed. The assert …
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 6798767dc90..ab46ac348e6 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);
}
}