From b823c5b87e87cab8dba71e3156357f9e841106f9 Mon Sep 17 00:00:00 2001 From: Congqi Xia Date: Wed, 30 Oct 2024 17:27:31 +0800 Subject: [PATCH] fix: Rectify `OffsetOrderedArray` contain logic Related to #36887 Remove non-hit pk delete record logic does not work since `insert_record_.contain` does not work due to logic problem. Signed-off-by: Congqi Xia --- internal/core/src/segcore/InsertRecord.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/core/src/segcore/InsertRecord.h b/internal/core/src/segcore/InsertRecord.h index 1dcc744b0142d..a009ca5e9d12a 100644 --- a/internal/core/src/segcore/InsertRecord.h +++ b/internal/core/src/segcore/InsertRecord.h @@ -179,7 +179,7 @@ class OffsetOrderedArray : public OffsetMap { [](const std::pair& elem, const T& value) { return elem.first < value; }); - return it != array_.end(); + return it != array_.end() && it->first == target; } std::vector