Add uids and seg_offsets check in segcore (#10983)

Signed-off-by: fishpenguin <kun.yu@zilliz.com>
This commit is contained in:
yukun 2021-11-01 15:21:52 +08:00 committed by GitHub
parent 225b2c66a0
commit d8044299a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -256,6 +256,9 @@ SegmentSealedImpl::get_deleted_bitmap(int64_t del_barrier,
for (int i = 0; i < uids.size(); ++i) {
bitmap->set(seg_offsets[i].get());
}
if (uids.size() == 0 || seg_offsets.size() == 0) {
return current;
}
if (del_barrier < old->del_barrier) {
for (auto del_index = del_barrier; del_index < old->del_barrier; ++del_index) {

View File

@ -203,7 +203,7 @@ print_query_result(const std::unique_ptr<milvus::indexbuilder::IndexWrapper::Que
// test for: https://github.com/milvus-io/milvus/issues/6569
TEST(BinIVFFlat, Build_and_Query) {
milvus::engine::KnowhereConfig::SetStatisticsLevel(2);
auto index_type = milvus::knowhere::IndexEnum::INDEX_FAISS_BIN_IVFFLAT;
auto metric_type = milvus::knowhere::Metric::TANIMOTO;
auto conf = generate_conf(index_type, metric_type);