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 <akupczyk@ibm.com>
}
}
}
- dest->cache->_trim();
+ // The cache has now more elements.
+ // Trimming right away will cause stalls.
+ // It will get adjusted in MempoolThread
}
// =======================================================