Skip to content

Commit

Permalink
enhance: [2.5]compress jsonstatslog path only save filename (#39979)
Browse files Browse the repository at this point in the history
enhance: compress jsonstatslog path only save filename
issue: #36995
pr: #38039

Signed-off-by: Xianhui.Lin <xianhui.lin@zilliz.com>
  • Loading branch information
JsDove authored Feb 19, 2025
1 parent 6357673 commit 04175d8
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion configs/milvus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ queryNode:
buildParallelRate: 0.5 # the ratio of building interim index parallel matched with cpu num
multipleChunkedEnable: true # Enable multiple chunked search
knowhereScoreConsistency: false # Enable knowhere strong consistency score computation logic
jsonIndexMemoryBudgetInTantivy: 64 # the memory budget for the JSON index In Tantivy
jsonIndexMemoryBudgetInTantivy: 16 # the memory budget for the JSON index In Tantivy
jsonIndexCommitInterval: 200 # the commit interval for the JSON index to commit
loadMemoryUsageFactor: 1 # The multiply factor of calculating the memory usage while loading segments
enableDisk: false # enable querynode load disk index, and search on disk index
Expand Down
2 changes: 1 addition & 1 deletion internal/core/src/common/Consts.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ const int64_t DEFAULT_HYBRID_INDEX_BITMAP_CARDINALITY_LIMIT = 100;

const size_t MARISA_NULL_KEY_ID = -1;

const int64_t DEFAULT_JSON_INDEX_MEMORY_BUDGET = 67108864; // bytes, 64MB
const int64_t DEFAULT_JSON_INDEX_MEMORY_BUDGET = 16777216; // bytes, 16MB
const int64_t DEFAULT_JSON_INDEX_COMMIT_INTERVAL = 200;
const bool DEFAULT_JSON_INDEX_ENABLED = true;
2 changes: 0 additions & 2 deletions internal/core/src/exec/expression/Expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@ CompileExpression(const expr::TypedExprPtr& expr,
const std::unordered_set<std::string>& flatten_candidates,
bool enable_constant_folding) {
ExprPtr result;
std::cout << "CompileExpression context" << context->get_consistency_level()
<< std::endl;
auto compiled_inputs = CompileInputs(expr, context, flatten_candidates);

auto GetTypes = [](const std::vector<ExprPtr>& exprs) {
Expand Down
12 changes: 11 additions & 1 deletion internal/core/src/index/JsonKeyInvertedIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ JsonKeyInvertedIndex::Upload(const Config& config) {
index_files.reserve(remote_paths_to_size.size() +
remote_mem_path_to_size.size());
for (auto& file : remote_paths_to_size) {
index_files.emplace_back(file.first, file.second);
index_files.emplace_back(disk_file_manager_->GetFileName(file.first),
file.second);
}
for (auto& file : remote_mem_path_to_size) {
index_files.emplace_back(file.first, file.second);
Expand All @@ -240,6 +241,15 @@ JsonKeyInvertedIndex::Load(milvus::tracer::TraceContext ctx,
AssertInfo(index_files.has_value(),
"index file paths is empty when load json key index");

for (auto& index_file : index_files.value()) {
boost::filesystem::path p(index_file);
if (!p.has_parent_path()) {
auto remote_prefix =
disk_file_manager_->GetRemoteJsonKeyLogPrefix();
index_file = remote_prefix + "/" + index_file;
}
}

disk_file_manager_->CacheJsonKeyIndexToDisk(index_files.value());
AssertInfo(
tantivy_index_exist(path_.c_str()), "index not exist: {}", path_);
Expand Down
2 changes: 0 additions & 2 deletions internal/core/src/query/ExecPlanNodeVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ ExecPlanNodeVisitor::ExecuteTask(
plan.plan_node_->ToString(),
query_context->get_active_count(),
query_context->get_query_timestamp());
std::cout << "ExecuteTask query_context"
<< query_context->get_consistency_level() << std::endl;
auto task =
milvus::exec::Task::Create(DEFAULT_TASK_ID, plan, 0, query_context);
int64_t processed_num = 0;
Expand Down
6 changes: 3 additions & 3 deletions internal/core/src/storage/DiskFileManagerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,15 @@ class DiskFileManagerImpl : public FileManagerImpl {
return added_total_file_size_;
}

std::string
GetFileName(const std::string& localfile);

private:
int64_t
GetIndexBuildId() {
return index_meta_.build_id;
}

std::string
GetFileName(const std::string& localfile);

std::string
GetRemoteIndexPath(const std::string& file_name, int64_t slice_num) const;

Expand Down
2 changes: 1 addition & 1 deletion pkg/util/paramtable/component_param.go
Original file line number Diff line number Diff line change
Expand Up @@ -3285,7 +3285,7 @@ user-task-polling:
p.JSONIndexMemoryBudgetInTantivy = ParamItem{
Key: "queryNode.segcore.jsonIndexMemoryBudgetInTantivy",
Version: "2.5.0",
DefaultValue: "64",
DefaultValue: "16",
Doc: "the memory budget for the JSON index In Tantivy",
Export: true,
}
Expand Down

0 comments on commit 04175d8

Please # to comment.