Feature description
WrappedExpiringStorage creates a periodic expiry-sweep interval and calls unref() on it, but the timer is never cleared during graceful server shutdown. The four default instances are not part of the application finalizer chain.
Make the storage finalizable, register each default instance with the server finalizer, and clear its timer during finalization. The instances are constructed together and each sweep enumerates its backing store, so also add a small configurable jitter to avoid all four sweeps firing at the same instant. Existing constructor calls and configurations should remain compatible.
Reactions are currently unavailable
Feature description
WrappedExpiringStorage creates a periodic expiry-sweep interval and calls unref() on it, but the timer is never cleared during graceful server shutdown. The four default instances are not part of the application finalizer chain.
Make the storage finalizable, register each default instance with the server finalizer, and clear its timer during finalization. The instances are constructed together and each sweep enumerates its backing store, so also add a small configurable jitter to avoid all four sweeps firing at the same instant. Existing constructor calls and configurations should remain compatible.