Skip to content

Commit

Permalink
update openssl to 3.1.2 (#27399)
Browse files Browse the repository at this point in the history
deal with root path's normalization

Signed-off-by: PowderLi <[email protected]>
  • Loading branch information
PowderLi authored Oct 8, 2023
1 parent a715165 commit 8d3069b
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 11 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ index_engine = knowhere

export GIT_BRANCH=master

ENABLE_AZURE = false
AZURE_OPTION := ""
ifeq (${ENABLE_AZURE}, false)
AZURE_OPTION := -Z
Expand Down
2 changes: 1 addition & 1 deletion internal/core/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class MilvusConan(ConanFile):
"snappy/1.1.9",
"lzo/2.10",
"arrow/11.0.0",
"openssl/1.1.1q",
"openssl/3.1.2",
"s2n/1.3.31@milvus/dev",
"aws-c-common/0.8.2@milvus/dev",
"aws-c-compression/0.2.15@milvus/dev",
Expand Down
2 changes: 1 addition & 1 deletion internal/core/src/storage/AzureChunkManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ uint64_t
AzureChunkManager::Read(const std::string& filepath, void* buf, uint64_t size) {
if (!ObjectExists(default_bucket_name_, filepath)) {
std::stringstream err_msg;
err_msg << "object('" << default_bucket_name_ << "', " << filepath
err_msg << "object('" << default_bucket_name_ << "', '" << filepath
<< "') not exists";
throw SegcoreError(ObjectNotExist, err_msg.str());
}
Expand Down
12 changes: 9 additions & 3 deletions internal/core/src/storage/ChunkManagers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ generateConfig(const StorageConfig& storage_config) {

AwsChunkManager::AwsChunkManager(const StorageConfig& storage_config) {
default_bucket_name_ = storage_config.bucket_name;
remote_root_path_ = storage_config.root_path;

InitSDKAPIDefault(storage_config.log_level);

Expand All @@ -92,12 +93,14 @@ AwsChunkManager::AwsChunkManager(const StorageConfig& storage_config) {

LOG_SEGCORE_INFO_ << "init AwsChunkManager with parameter[endpoint: '"
<< storage_config.address << "', default_bucket_name:'"
<< storage_config.bucket_name << "', use_secure:'"
<< storage_config.bucket_name << "', root_path:'"
<< storage_config.root_path << "', use_secure:'"
<< std::boolalpha << storage_config.useSSL << "']";
}

GcpChunkManager::GcpChunkManager(const StorageConfig& storage_config) {
default_bucket_name_ = storage_config.bucket_name;
remote_root_path_ = storage_config.root_path;

if (storage_config.useIAM) {
sdk_options_.httpOptions.httpClientFactory_create_fn = []() {
Expand All @@ -124,12 +127,14 @@ GcpChunkManager::GcpChunkManager(const StorageConfig& storage_config) {

LOG_SEGCORE_INFO_ << "init GcpChunkManager with parameter[endpoint: '"
<< storage_config.address << "', default_bucket_name:'"
<< storage_config.bucket_name << "', use_secure:'"
<< storage_config.bucket_name << "', root_path:'"
<< storage_config.root_path << "', use_secure:'"
<< std::boolalpha << storage_config.useSSL << "']";
}

AliyunChunkManager::AliyunChunkManager(const StorageConfig& storage_config) {
default_bucket_name_ = storage_config.bucket_name;
remote_root_path_ = storage_config.root_path;

InitSDKAPIDefault(storage_config.log_level);

Expand All @@ -156,7 +161,8 @@ AliyunChunkManager::AliyunChunkManager(const StorageConfig& storage_config) {

LOG_SEGCORE_INFO_ << "init AliyunChunkManager with parameter[endpoint: '"
<< storage_config.address << "', default_bucket_name:'"
<< storage_config.bucket_name << "', use_secure:'"
<< storage_config.bucket_name << "', root_path:'"
<< storage_config.root_path << "', use_secure:'"
<< std::boolalpha << storage_config.useSSL << "']";
}

Expand Down
5 changes: 3 additions & 2 deletions internal/core/src/storage/MinioChunkManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ MinioChunkManager::MinioChunkManager(const StorageConfig& storage_config)

LOG_SEGCORE_INFO_ << "init MinioChunkManager with parameter[endpoint: '"
<< storage_config.address << "', default_bucket_name:'"
<< storage_config.bucket_name << "', use_secure:'"
<< storage_config.bucket_name << "', root_path:'"
<< storage_config.root_path << "', use_secure:'"
<< std::boolalpha << storage_config.useSSL << "']";
}

Expand Down Expand Up @@ -360,7 +361,7 @@ uint64_t
MinioChunkManager::Read(const std::string& filepath, void* buf, uint64_t size) {
if (!ObjectExists(default_bucket_name_, filepath)) {
std::stringstream err_msg;
err_msg << "object('" << default_bucket_name_ << "', " << filepath
err_msg << "object('" << default_bucket_name_ << "', '" << filepath
<< "') not exists";
throw SegcoreError(ObjectNotExist, err_msg.str());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ AzureBlobChunkManager::GetObjectSize(const std::string& bucket_name,
}
}
std::stringstream err_msg;
err_msg << "object('" << bucket_name << "', " << object_name
err_msg << "object('" << bucket_name << "', '" << object_name
<< "') not exists";
throw std::runtime_error(err_msg.str());
}
Expand Down
11 changes: 9 additions & 2 deletions pkg/util/paramtable/service_param.go
Original file line number Diff line number Diff line change
Expand Up @@ -1017,8 +1017,15 @@ func (p *MinioConfig) Init(base *BaseTable) {
p.BucketName.Init(base.mgr)

p.RootPath = ParamItem{
Key: "minio.rootPath",
Version: "2.0.0",
Key: "minio.rootPath",
Version: "2.0.0",
Formatter: func(rootPath string) string {
if rootPath == "" {
return ""
}
rootPath = strings.TrimLeft(rootPath, "/")
return path.Clean(rootPath)
},
PanicIfEmpty: false,
Doc: "The root path where the message is stored in MinIO/S3",
Export: true,
Expand Down

0 comments on commit 8d3069b

Please sign in to comment.