diff --git a/example/keyword_pir_db_build_task_conf.json b/example/keyword_pir_db_build_task_conf.json index b67a101e..ff2dc373 100644 --- a/example/keyword_pir_db_build_task_conf.json +++ b/example/keyword_pir_db_build_task_conf.json @@ -13,9 +13,9 @@ "value": 1 }, "DbInfo": { - "description": "create sender db offline", + "description": "create sender db offline, format of file_name: concat datasetid with key columns, seperated by _", "type": "STRING", - "value": "data/cache/keyword_pir_server_data" + "value": "data/cache/keyword_pir_server_data_0_1" }, "QueryConfig": { "type": "OBJECT", diff --git a/src/primihub/task/semantic/pir_task.cc b/src/primihub/task/semantic/pir_task.cc index 54ad81a6..c125f234 100644 --- a/src/primihub/task/semantic/pir_task.cc +++ b/src/primihub/task/semantic/pir_task.cc @@ -66,12 +66,16 @@ retcode PirTask::BuildOptions(const rpc::Task& task, pir::Options* options) { auto it = param_map.find(party_name()); if (it != param_map.end()) { options->db_path.append(it->second.value_string()); + } else { LOG(ERROR) << "dateset id is not set"; return retcode::FAIL; } } else { - options->db_path.append(this->dataset_id_); + options->db_path.append(this->dataset_id_); + } + for (const auto key_index : this->server_key_columns_) { + options->db_path.append("_").append(std::to_string(key_index)); } if (DbCacheAvailable(options->db_path)) {