applyRetention method
Adopts a new retention, dropping what it no longer covers — from entries at once and from storage as soon as earlier writes have landed. Settings are often read after the log is open, so this is how a configured value arrives.
Implementation
void applyRetention(Duration value) {
if (value == _retention) return;
_retention = value;
_prune();
pruneStorage();
}