carrotdata / carrot-cache

In-Out-Process Java cache (L1/L2 off-heap, scalable, ZeroGC) with full SSD support
Apache License 2.0
3 stars 0 forks source link

[CODE] Better back pressure algorithm for put operations #407

Open VladRodionov opened 3 months ago

VladRodionov commented 3 months ago

Currently we enforce loop wait (with sleeps) up to predefined cache.wait.put.max.ms configuration value, which is 20 ms, by default when cache is under pressure and scavengers are active. When timeout is over a put operation is being bailed out, resulting in rejected write. Rejected writes are unexpected outcomes, so we have to reconsider this approach.