Skip to content

Commit

Permalink
Ensure SSTs compressed in tiered_secondary_cache_test
Browse files Browse the repository at this point in the history
Summary: It appears the arm testsuite is failing because it is building
without snappy, which is causing the SST files not to be compressed,
which somehow causes these tests to fail. Manually setting LZ4 which is
already required.

Test Plan: reproduced and verified fix on ARM laptop
  • Loading branch information
pdillinger committed Sep 4, 2024
1 parent 064c0ad commit 9a5021e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cache/tiered_secondary_cache_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ TEST_F(DBTieredSecondaryCacheTest, BasicTest) {
table_options.cache_index_and_filter_blocks = false;
Options options = GetDefaultOptions();
options.create_if_missing = true;
options.compression = kLZ4Compression;
options.table_factory.reset(NewBlockBasedTableFactory(table_options));

// Disable paranoid_file_checks so that flush will not read back the newly
Expand Down Expand Up @@ -364,6 +365,7 @@ TEST_F(DBTieredSecondaryCacheTest, BasicMultiGetTest) {
table_options.cache_index_and_filter_blocks = false;
Options options = GetDefaultOptions();
options.create_if_missing = true;
options.compression = kLZ4Compression;
options.table_factory.reset(NewBlockBasedTableFactory(table_options));

options.paranoid_file_checks = false;
Expand Down Expand Up @@ -506,6 +508,7 @@ TEST_F(DBTieredSecondaryCacheTest, WaitAllTest) {
table_options.cache_index_and_filter_blocks = false;
Options options = GetDefaultOptions();
options.create_if_missing = true;
options.compression = kLZ4Compression;
options.table_factory.reset(NewBlockBasedTableFactory(table_options));

options.paranoid_file_checks = false;
Expand Down Expand Up @@ -606,6 +609,7 @@ TEST_F(DBTieredSecondaryCacheTest, ReadyBeforeWaitAllTest) {
table_options.cache_index_and_filter_blocks = false;
Options options = GetDefaultOptions();
options.create_if_missing = true;
options.compression = kLZ4Compression;
options.table_factory.reset(NewBlockBasedTableFactory(table_options));
options.statistics = CreateDBStatistics();

Expand Down Expand Up @@ -717,6 +721,7 @@ TEST_F(DBTieredSecondaryCacheTest, IterateTest) {
table_options.cache_index_and_filter_blocks = false;
Options options = GetDefaultOptions();
options.create_if_missing = true;
options.compression = kLZ4Compression;
options.table_factory.reset(NewBlockBasedTableFactory(table_options));

options.paranoid_file_checks = false;
Expand Down Expand Up @@ -784,6 +789,7 @@ TEST_P(DBTieredAdmPolicyTest, CompressedOnlyTest) {
table_options.cache_index_and_filter_blocks = false;
Options options = GetDefaultOptions();
options.create_if_missing = true;
options.compression = kLZ4Compression;
options.table_factory.reset(NewBlockBasedTableFactory(table_options));

size_t comp_cache_usage = compressed_secondary_cache()->TEST_GetUsage();
Expand Down Expand Up @@ -836,6 +842,7 @@ TEST_P(DBTieredAdmPolicyTest, CompressedCacheAdmission) {
table_options.cache_index_and_filter_blocks = false;
Options options = GetDefaultOptions();
options.create_if_missing = true;
options.compression = kLZ4Compression;
options.table_factory.reset(NewBlockBasedTableFactory(table_options));

size_t comp_cache_usage = compressed_secondary_cache()->TEST_GetUsage();
Expand Down Expand Up @@ -937,6 +944,7 @@ TEST_F(DBTieredSecondaryCacheTest, FSBufferTest) {
table_options.cache_index_and_filter_blocks = false;
Options options = GetDefaultOptions();
options.create_if_missing = true;
options.compression = kLZ4Compression;
options.table_factory.reset(NewBlockBasedTableFactory(table_options));
options.statistics = CreateDBStatistics();
options.env = wrap_env.get();
Expand Down

0 comments on commit 9a5021e

Please sign in to comment.