From d2f2d866991b356bc4f8c595982abd20e591d7a4 Mon Sep 17 00:00:00 2001 From: Adam Kupczyk Date: Tue, 26 May 2026 10:38:17 +0000 Subject: [PATCH] os/bluestore: Collection::split_cache no longer purges cache There are 2 cases when Collection::split_cache is used: 1) Merge Collections. It this case we get more elements in dest collection, but we do not want to trim by force as it might cause stall. 2) Split Collection Source cache is getting thinner, and dest cache is growing. Similarly, trimming dest will cause stall. Decision: It is better to not trim forcibly and relay on gradual trimming from MempoolThread or client IO. Signed-off-by: Adam Kupczyk --- src/os/bluestore/BlueStore.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index ca5a9c40783..7828dd000b0 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -5522,7 +5522,9 @@ void BlueStore::Collection::split_cache( } } } - dest->cache->_trim(); + // The cache has now more elements. + // Trimming right away will cause stalls. + // It will get adjusted in MempoolThread } // ======================================================= -- 2.47.3