Skip to content

Commit

Permalink
fix:[2.4]GrowingDataGetter get the wrong string data
Browse files Browse the repository at this point in the history
Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>
  • Loading branch information
cqy123456 committed Nov 25, 2024
1 parent cf1c423 commit fa481f5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
10 changes: 5 additions & 5 deletions configs/milvus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -412,15 +412,15 @@ queryNode:
# 2. If set to "disable" original vector data will only be loaded into the chunk cache during search/query.
warmup: disable
mmap:
vectorField: false # Enable mmap for loading vector data
vectorIndex: false # Enable mmap for loading vector index
scalarField: false # Enable mmap for loading scalar data
scalarIndex: false # Enable mmap for loading scalar index
vectorField: true # Enable mmap for loading vector data
vectorIndex: true # Enable mmap for loading vector index
scalarField: true # Enable mmap for loading scalar data
scalarIndex: true # Enable mmap for loading scalar index
chunkCache: true # Enable mmap for chunk cache (raw vector retrieving).
# Enable memory mapping (mmap) to optimize the handling of growing raw data.
# By activating this feature, the memory overhead associated with newly added or modified data will be significantly minimized.
# However, this optimization may come at the cost of a slight decrease in query latency for the affected data segments.
growingMmapEnabled: false
growingMmapEnabled: true
fixedFileSizeForMmapAlloc: 1 # tmp file size for mmap chunk manager
maxDiskUsagePercentageForMmapAlloc: 50 # disk percentage used in mmap chunk manager
lazyload:
Expand Down
6 changes: 5 additions & 1 deletion internal/core/src/query/GroupByOperator.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ class GrowingDataGetter : public DataGetter<T> {

T
Get(int64_t idx) const {
return growing_raw_data_->operator[](idx);
if constexpr (std::is_same_v<std::string, T>) {
return T(growing_raw_data_->view_element(idx));
} else {
return growing_raw_data_->operator[](idx);
}
}
};

Expand Down

0 comments on commit fa481f5

Please sign in to comment.