Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
  • Loading branch information
shaoting-huang committed Oct 9, 2024
1 parent 1c69040 commit e779051
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions cpp/benchmark/benchmark_packed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ static void PackedWrite(benchmark::State& st, arrow::fs::FileSystem* fs, const s
auto record_batch = arrow::RecordBatch::Make(schema, 3, arrays);

for (auto _ : st) {
PackedRecordBatchWriter writer(buffer_size, schema, *fs, path, storage_config_,
*parquet::default_writer_properties());
auto conf = StorageConfig();
conf.use_custom_part_upload_size = true;
conf.part_size = 30 * 1024 * 1024;
PackedRecordBatchWriter writer(buffer_size, schema, *fs, path, conf, *parquet::default_writer_properties());
for (int i = 0; i < 8 * 1024; ++i) {
auto r = writer.Write(record_batch);
if (!r.ok()) {
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/milvus-storage/common/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct StorageConfig {
std::string cloud_provider = "";
std::string region = "";
bool use_custom_part_upload_size = false;
int part_size = 0;
int64_t part_size = 0;

std::string ToString() const {
std::stringstream ss;
Expand Down
2 changes: 1 addition & 1 deletion cpp/test/packed/packed_test_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class PackedTestBase : public ::testing::Test {
storage_config_ = std::move(conf);

auto factory = std::make_shared<FileSystemFactory>();
ASSERT_AND_ASSIGN(fs_, factory->BuildFileSystem(conf, &file_path_));
ASSERT_AND_ASSIGN(fs_, factory->BuildFileSystem(storage_config_, &file_path_));

SetUpCommonData();
props_ = *parquet::default_writer_properties();
Expand Down

0 comments on commit e779051

Please sign in to comment.