Skip to content

Commit 84f8144

Browse files
mszeszko-metafacebook-github-bot
authored andcommitted
Remove reservation mismatch assert in cache adapter destructor (facebook#13885)
Summary: The assert occasionally throws off the stress test runs. We already have sufficient logging in place to collect the signal about secondary cache capacity exceeding primary cache reservation for further investigation. Pull Request resolved: facebook#13885 Reviewed By: anand1976 Differential Revision: D80355513 Pulled By: mszeszko-meta fbshipit-source-id: b36926f0493a3aca19818a1980ef79277db9fe7e
1 parent 772e342 commit 84f8144

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

cache/secondary_cache_adapter.cc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,13 @@ CacheWithSecondaryAdapter::~CacheWithSecondaryAdapter() {
121121
assert(s.ok());
122122
assert(placeholder_usage_ == 0);
123123
assert(reserved_usage_ == 0);
124-
bool pri_cache_res_mismatch =
125-
pri_cache_res_->GetTotalMemoryUsed() != sec_capacity;
126-
if (pri_cache_res_mismatch) {
127-
fprintf(stderr,
124+
if (pri_cache_res_->GetTotalMemoryUsed() != sec_capacity) {
125+
fprintf(stdout,
128126
"~CacheWithSecondaryAdapter: Primary cache reservation: "
129127
"%zu, Secondary cache capacity: %zu, "
130128
"Secondary cache reserved: %zu\n",
131129
pri_cache_res_->GetTotalMemoryUsed(), sec_capacity,
132130
sec_reserved_);
133-
assert(!pri_cache_res_mismatch);
134131
}
135132
}
136133
#endif // NDEBUG

0 commit comments

Comments
 (0)