Skip to content

Commit 59d495d

Browse files
committed
pinIndex is a const and only do read operations rlock would be the right choice for performance
Signed-off-by:lanqingy93@gmail.com
1 parent 31976d8 commit 59d495d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/core/src/segcore/ChunkedSegmentSealedImpl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class ChunkedSegmentSealedImpl : public SegmentSealed {
8888
FieldId field_id,
8989
bool include_ngram = false) const override {
9090
auto [scalar_indexings, ngram_fields] =
91-
lock(folly::wlock(scalar_indexings_), folly::wlock(ngram_fields_));
91+
lock(folly::rlock(scalar_indexings_), folly::rlock(ngram_fields_));
9292
if (!include_ngram) {
9393
if (ngram_fields->find(field_id) != ngram_fields->end()) {
9494
return {};

0 commit comments

Comments
 (0)