mirror of
https://github.com/facebook/rocksdb.git
synced 2026-07-07 14:47:40 +08:00
Improve debugging of CacheWithSecondaryAdapter failures (#13737)
Summary: improve assertions, one apparently a previous typo in https://github.com/facebook/rocksdb/issues/13606 and one a suspected possible area of logic error Pull Request resolved: https://github.com/facebook/rocksdb/pull/13737 Test Plan: watch crash test Reviewed By: anand1976 Differential Revision: D77453102 Pulled By: pdillinger fbshipit-source-id: d4196910a9e8d59ef814130a52ff4ebf188a976d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
7183422b17
commit
80c9eec6b6
Vendored
+2
-1
@@ -130,7 +130,7 @@ CacheWithSecondaryAdapter::~CacheWithSecondaryAdapter() {
|
||||
"Secondary cache reserved: %zu\n",
|
||||
pri_cache_res_->GetTotalMemoryUsed(), sec_capacity,
|
||||
sec_reserved_);
|
||||
assert(pri_cache_res_mismatch);
|
||||
assert(!pri_cache_res_mismatch);
|
||||
}
|
||||
}
|
||||
#endif // NDEBUG
|
||||
@@ -613,6 +613,7 @@ Status CacheWithSecondaryAdapter::UpdateCacheReservationRatio(
|
||||
// cache utilization (increase in capacity - increase in share of cache
|
||||
// reservation)
|
||||
// 3. Increase secondary cache capacity
|
||||
assert(new_sec_reserved >= sec_reserved_);
|
||||
s = secondary_cache_->Deflate(new_sec_reserved - sec_reserved_);
|
||||
assert(s.ok());
|
||||
s = pri_cache_res_->UpdateCacheReservation(
|
||||
|
||||
Reference in New Issue
Block a user