Add log to debug bitset (#19982)

Signed-off-by: Enwei Jiao <enwei.jiao@zilliz.com>

Signed-off-by: Enwei Jiao <enwei.jiao@zilliz.com>
pull/20004/head
Enwei Jiao 2022-10-24 10:09:28 +08:00 committed by GitHub
parent 08cfc140d7
commit 4e5d1c2e5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -48,12 +48,14 @@ class BitsetView : public faiss::BitsetView {
BitsetView
subview(size_t offset, size_t size) const {
if (empty()) {
return BitsetView();
return {};
}
AssertInfo((offset & 0x7) == 0, "offset is not divisible by 8");
AssertInfo((offset + size) <= this->size(), "offset + size cross the border.");
return BitsetView(data() + (offset >> 3), size);
AssertInfo((offset + size) <= this->size(), "offset + size cross the border.[offset=" + std::to_string(offset) +
"][size=" + std::to_string(size) +
"][this.size()=" + std::to_string(this->size()) + "]");
return {data() + (offset >> 3), size};
}
};

View File

@ -85,7 +85,6 @@ SearchOnGrowing(const segcore::SegmentGrowingImpl& segment,
const BitsetView& bitset,
SearchResult& results) {
auto& schema = segment.get_schema();
auto& indexing_record = segment.get_indexing_record();
auto& record = segment.get_insert_record();
auto active_count = segment.get_active_count(timestamp);