diff --git a/RELEASE.md b/RELEASE.md index 6fc2b47..90cdcb4 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -5,6 +5,9 @@ > - `[API]` prefix for API changes. > - `[Improvement]` prefix for implementation improvement. +## v0.3.0.dev240304 +- [API] expose ic_mode in RunLegacyPsi api + ## v0.3.0.dev240222 - [API] expose PIR API. diff --git a/psi/ecdh/client.cc b/psi/ecdh/client.cc index 63d3c0d..125d01a 100644 --- a/psi/ecdh/client.cc +++ b/psi/ecdh/client.cc @@ -16,6 +16,10 @@ #include +#include "boost/uuid/uuid.hpp" +#include "boost/uuid/uuid_generators.hpp" +#include "boost/uuid/uuid_io.hpp" + #include "psi/legacy/bucket_psi.h" #include "psi/utils/arrow_csv_batch_provider.h" #include "psi/utils/sync.h" @@ -82,9 +86,11 @@ void EcdhUbPsiClient::Online() { std::make_shared(config_.input_config().path(), selected_keys); - std::string ec_point_store_path1 = fmt::format( - "{}/tmp-self-cipher-store-{}.csv", - std::filesystem::temp_directory_path().string(), lctx_->Rank()); + boost::uuids::random_generator uuid_generator; + std::string ec_point_store_path1 = + fmt::format("{}/{}/tmp-self-cipher-store-{}.csv", + std::filesystem::temp_directory_path().string(), + boost::uuids::to_string(uuid_generator()), lctx_->Rank()); auto self_ec_point_store = std::make_shared( ec_point_store_path1, true, "self", false); diff --git a/psi/launch.cc b/psi/launch.cc index f0ea0f8..b4e9d0c 100644 --- a/psi/launch.cc +++ b/psi/launch.cc @@ -153,7 +153,7 @@ PsiResultReport RunUbPsi(const v2::UbPsiConfig& ub_psi_config, PsiResultReport RunLegacyPsi(const BucketPsiConfig& bucket_psi_config, const std::shared_ptr& lctx, ProgressCallbacks progress_callbacks, - int64_t callbacks_interval_ms) { + int64_t callbacks_interval_ms, bool ic_mode) { google::protobuf::util::JsonPrintOptions json_print_options; json_print_options.preserve_proto_field_names = true; @@ -163,7 +163,7 @@ PsiResultReport RunLegacyPsi(const BucketPsiConfig& bucket_psi_config, .ok()); SPDLOG_INFO("LEGACY PSI config: {}", config_json); - BucketPsi bucket_psi(bucket_psi_config, lctx); + BucketPsi bucket_psi(bucket_psi_config, lctx, ic_mode); return bucket_psi.Run(progress_callbacks, callbacks_interval_ms); } diff --git a/psi/launch.h b/psi/launch.h index 9eabaa3..55b24f8 100644 --- a/psi/launch.h +++ b/psi/launch.h @@ -30,7 +30,8 @@ namespace psi { PsiResultReport RunLegacyPsi(const BucketPsiConfig& bucket_psi_config, const std::shared_ptr& lctx, ProgressCallbacks progress_callbacks = nullptr, - int64_t callbacks_interval_ms = 5 * 1000); + int64_t callbacks_interval_ms = 5 * 1000, + bool ic_mode = false); PsiResultReport RunPsi(const v2::PsiConfig& psi_config, const std::shared_ptr& lctx); diff --git a/psi/version.h b/psi/version.h index a30c33e..e23a86e 100644 --- a/psi/version.h +++ b/psi/version.h @@ -17,4 +17,4 @@ #define PSI_VERSION_MAJOR 0 #define PSI_VERSION_MINOR 3 #define PSI_VERSION_PATCH 0 -#define PSI_DEV_IDENTIFIER ".dev240222" +#define PSI_DEV_IDENTIFIER ".dev240304"