mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-28 14:35:27 +08:00
fix: use rlock for pinindex (#45932)
fixes: https://github.com/milvus-io/milvus/issues/45934 pinIndex is a const and only do read operations rlock would be the right choice for performance Signed-off-by: Lanqing Yang <lanqingy93@gmail.com>
This commit is contained in:
parent
ab90dd287f
commit
3e15604f2e
@ -89,7 +89,7 @@ class ChunkedSegmentSealedImpl : public SegmentSealed {
|
||||
FieldId field_id,
|
||||
bool include_ngram = false) const override {
|
||||
auto [scalar_indexings, ngram_fields] =
|
||||
lock(folly::wlock(scalar_indexings_), folly::wlock(ngram_fields_));
|
||||
lock(folly::rlock(scalar_indexings_), folly::rlock(ngram_fields_));
|
||||
if (!include_ngram) {
|
||||
if (ngram_fields->find(field_id) != ngram_fields->end()) {
|
||||
return {};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user