File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -316,7 +316,9 @@ class ivf_pq_test : public ::testing::TestWithParam<ivf_pq_inputs> {
316316 // NB: this is not reference, the list is retained; the index will have to create a new list on
317317 // `erase_list` op.
318318 auto old_list = index->lists ()[label];
319- auto n_rows = old_list->size .load ();
319+ // If the data is unbalanced the list might be empty, which is actually nullptr
320+ if (!old_list) { return ; }
321+ auto n_rows = old_list->size .load ();
320322 if (n_rows == 0 ) { return ; }
321323 if (index->metric () == cuvs::distance::DistanceType::CosineExpanded) { return ; }
322324
@@ -350,7 +352,9 @@ class ivf_pq_test : public ::testing::TestWithParam<ivf_pq_inputs> {
350352 void check_packing (index<IdxT>* index, uint32_t label)
351353 {
352354 auto old_list = index->lists ()[label];
353- auto n_rows = old_list->size .load ();
355+ // If the data is unbalanced the list might be empty, which is actually nullptr
356+ if (!old_list) { return ; }
357+ auto n_rows = old_list->size .load ();
354358
355359 if (n_rows == 0 ) { return ; }
356360
You can’t perform that action at this time.
0 commit comments