@@ -1299,21 +1299,19 @@ int ObPluginVectorIndexAdaptor::handle_insert_embedded_table_rows(blocksstable::
12991299 }
13001300 if (OB_SUCC (ret) && incr_vid_count > 0 ) {
13011301 lib::ObMallocHookAttrGuard malloc_guard (lib::ObMemAttr (tenant_id_, " VIndexVsagADP" ));
1302- TCWLockGuard lock_guard (incr_data_->mem_data_rwlock_ );
13031302 if (OB_FAIL (obvectorutil::add_index (incr_data_->index_ ,
13041303 vectors,
13051304 incr_vids,
13061305 dim,
13071306 extra_info_buf_ptr,
13081307 incr_vid_count))) {
13091308 LOG_WARN (" failed to add index." , K (ret), K (dim), K (row_count));
1310- } else {
1311- incr_data_->set_vid_bound (vid_bound);
13121309 }
13131310 }
13141311 if (OB_SUCC (ret)) {
13151312 lib::ObMallocHookAttrGuard malloc_guard (lib::ObMemAttr (tenant_id_, " VIBitmapADPH" ));
13161313 TCWLockGuard lock_guard (incr_data_->bitmap_rwlock_ );
1314+ incr_data_->set_vid_bound (vid_bound);
13171315 for (int64_t i = 0 ; OB_SUCC (ret) && i < incr_vid_count; i++) {
13181316 ROARING_TRY_CATCH (roaring::api::roaring64_bitmap_add (incr_data_->bitmap_ ->insert_bitmap_ , incr_vids[i]));
13191317 }
@@ -1580,7 +1578,6 @@ int ObPluginVectorIndexAdaptor::insert_rows(blocksstable::ObDatumRow *rows,
15801578 if (OB_SUCC (ret) && incr_vid_count > 0 ) {
15811579 lib::ObMallocHookAttrGuard malloc_guard (lib::ObMemAttr (tenant_id_, " VIndexVsagADP" ));
15821580 lib::ObLightBacktraceGuard light_backtrace_guard (false );
1583- TCWLockGuard lock_guard (incr_data_->mem_data_rwlock_ );
15841581 if (is_sparse_vector_index_type ()) {
15851582 if (OB_FAIL (obvectorutil::add_index (incr_data_->index_ ,
15861583 lens,
@@ -1591,8 +1588,6 @@ int ObPluginVectorIndexAdaptor::insert_rows(blocksstable::ObDatumRow *rows,
15911588 extra_info_buf_ptr
15921589 ))) {
15931590 LOG_WARN (" failed to add sparse index." , K (ret), K (dim), K (row_count));
1594- } else {
1595- incr_data_->set_vid_bound (vid_bound);
15961591 }
15971592 } else {
15981593 if (OB_FAIL (obvectorutil::add_index (incr_data_->index_ ,
@@ -1602,14 +1597,13 @@ int ObPluginVectorIndexAdaptor::insert_rows(blocksstable::ObDatumRow *rows,
16021597 extra_info_buf_ptr,
16031598 incr_vid_count))) {
16041599 LOG_WARN (" failed to add index." , K (ret), K (dim), K (row_count));
1605- } else {
1606- incr_data_->set_vid_bound (vid_bound);
16071600 }
16081601 }
16091602 }
16101603 if (OB_SUCC (ret)) {
16111604 lib::ObMallocHookAttrGuard malloc_guard (lib::ObMemAttr (tenant_id_, " VIBitmapADPH" ));
16121605 TCWLockGuard lock_guard (incr_data_->bitmap_rwlock_ );
1606+ incr_data_->set_vid_bound (vid_bound);
16131607 for (int64_t i = 0 ; OB_SUCC (ret) && i < incr_vid_count; i++) {
16141608 ROARING_TRY_CATCH (roaring::api::roaring64_bitmap_add (incr_data_->bitmap_ ->insert_bitmap_ , incr_vids[i]));
16151609 }
@@ -2300,9 +2294,9 @@ int ObPluginVectorIndexAdaptor::write_into_delta_mem(ObVectorQueryAdaptorResultC
23002294 for (int64_t i = 0 ; OB_SUCC (ret) && i < count; i++) {
23012295 ROARING_TRY_CATCH (roaring::api::roaring64_bitmap_add (incr_data_->bitmap_ ->insert_bitmap_ , vids[i]));
23022296 }
2303- }
2304- if ( OB_SUCC (ret)) {
2305- incr_data_-> set_vid_bound (vid_bound);
2297+ if ( OB_SUCC (ret)) {
2298+ incr_data_-> set_vid_bound (vid_bound);
2299+ }
23062300 }
23072301 LOG_TRACE (" write into delta mem." , K (ret), K (ctx->get_dim ()), K (count));
23082302 }
0 commit comments