Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
acelyc111 committed Dec 14, 2023
1 parent 57b31f1 commit 809fbde
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/test/function_test/bulk_load/test_bulk_load.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class bulk_load_test : public test_util
NO_FATALS(run_cmd_from_project_root(fmt::format("mkdir -p {}", partition_path)));

// Generate 2 sst files for each partition.
for (int j = 0; j < 2; j++) {
for (int j = 1; j <= 2; j++) {
auto sst_file = fmt::format("{}/{:05}.sst", partition_path, j);

// Create a SstFileWriter to generate the external sst file.
Expand All @@ -140,6 +140,9 @@ class bulk_load_test : public test_util
// result.
// We can improve to generate only the data which belongs to the partition later.
for (int k = 0; k < kBulkLoadItemCount; k++) {
if (k % j != 0) {
continue;
}
dsn::blob bb_key;
pegasus_generate_key(
bb_key, fmt::format("{}{:04}", kHashKeyPrefix1, k), kDefaultSortkey);
Expand All @@ -153,6 +156,9 @@ class bulk_load_test : public test_util

// Write 2 hashkey prefixes to check the functionality.
for (int k = 0; k < kBulkLoadItemCount; k++) {
if (k % j != 0) {
continue;
}
dsn::blob bb_key;
pegasus_generate_key(
bb_key, fmt::format("{}{:04}", kHashKeyPrefix2, k), kDefaultSortkey);
Expand Down

0 comments on commit 809fbde

Please sign in to comment.