Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyBenMoshe committed Sep 12, 2023
1 parent c771deb commit 063a70e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
3 changes: 1 addition & 2 deletions options/options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -629,11 +629,10 @@ ColumnFamilyOptions* ColumnFamilyOptions::EnableSpeedbFeaturesCF(
assert(s.ok());
block_based_table_options.cache_index_and_filter_blocks = true;
block_based_table_options.block_cache = shared_options.cache;
auto& cache_usage_options = block_based_table_options.cache_usage_options;
std::string pinning_policy_s = "id=speedb_scoped_pinning_policy; capacity=";
pinning_policy_s += 0.8 * shared_options.GetTotalRamSizeBytes();
pinning_policy_s += "; bottom_percent=60; mid_percent=75";
Status s = TablePinningPolicy::CreateFromString(config_options,
s = TablePinningPolicy::CreateFromString(config_options,
pinning_policy_s,
&block_based_table_options.pinning_policy);

Expand Down
20 changes: 0 additions & 20 deletions options/options_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5092,26 +5092,6 @@ TEST_F(SharedOptionsTest, EnableSpeedbFeaturesCF) {
for (auto options_overrides_iter = sanitized_options_overrides.cbegin();
options_overrides_iter != sanitized_options_overrides.cend();
++options_overrides_iter) {
CacheEntryRoleOptions role_options = options_overrides_iter->second;
CacheEntryRoleOptions default_options =
sanitized_table_options->cache_usage_options.options;
if (options_overrides_iter->first == CacheEntryRole::kFilterConstruction) {
ASSERT_EQ(role_options.charged,
CacheEntryRoleOptions::Decision::kEnabled);
} else if (options_overrides_iter->first ==
CacheEntryRole::kBlockBasedTableReader) {
ASSERT_EQ(role_options.charged,
CacheEntryRoleOptions::Decision::kEnabled);
} else if (options_overrides_iter->first ==
CacheEntryRole::kCompressionDictionaryBuildingBuffer) {
ASSERT_EQ(role_options.charged,
CacheEntryRoleOptions::Decision::kEnabled);
} else if (options_overrides_iter->first == CacheEntryRole::kFileMetadata) {
ASSERT_EQ(role_options.charged,
CacheEntryRoleOptions::Decision::kEnabled);
} else {
EXPECT_TRUE(role_options == default_options);
}
}
}

Expand Down

0 comments on commit 063a70e

Please sign in to comment.