Skip to content

Commit 53d70df

Browse files
obdevfootkaxiebaoma
authored andcommitted
fix: sparse_vector count
Co-authored-by: footka <672528926@qq.com> Co-authored-by: xiebaoma <2402583447@qq.com>
1 parent 80ea088 commit 53d70df

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/share/vector_index/ob_vector_index_async_task_util.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1544,7 +1544,8 @@ int ObVecIndexAsyncTask::process_data_for_index(ObPluginVectorIndexAdaptor &adap
15441544
vid_bound.set_vid(vid_datum->storage_datums_[vid_column_pos].get_int());
15451545
current_count += 1;
15461546
if (adaptor.is_sparse_vector_index_type()) {
1547-
if (curr_total_length >= VEC_INDEX_IPIVF_BUILD_COUNT_THRESHOLD) {
1547+
if (curr_total_length >= VEC_INDEX_IPIVF_BUILD_COUNT_THRESHOLD
1548+
|| current_count >= VEC_INDEX_HNSWSQ_BUILD_COUNT_THRESHOLD) {
15481549
if (OB_FAIL(adaptor.add_snap_index(
15491550
vectors, vids, out_extra_obj, extra_column_count, current_count, sparse_byte_lens))) {
15501551
LOG_WARN("failed to add sparse snap index", K(ret), K(vectors), K(vids), K(current_count));

0 commit comments

Comments
 (0)