Fix insert search concurrency problem (#20065)

Signed-off-by: yangxuan <xuan.yang@zilliz.com>

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
pull/20105/head
XuanYang-cn 2022-10-26 18:57:36 +08:00 committed by GitHub
parent 346b2ac2f2
commit c24244240e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
// or implied. See the License for the specific language governing permissions and limitations under the License
#include <cstddef>
#include "common/BitsetView.h"
#include "common/QueryInfo.h"
#include "SearchOnGrowing.h"
@ -86,7 +87,7 @@ SearchOnGrowing(const segcore::SegmentGrowingImpl& segment,
SearchResult& results) {
auto& schema = segment.get_schema();
auto& record = segment.get_insert_record();
auto active_count = segment.get_active_count(timestamp);
auto active_count = std::min(int64_t(bitset.size()), segment.get_active_count(timestamp));
// step 1.1: get meta
// step 1.2: get which vector field to search