Description
Instances of storage lifecycle objects usually create background goroutines to perform various operations asynchronously. Currently, these are generally signaled to exit via context cancellation.
This is mostly fine, but occasionally causes issues in tests when things run on longer than they should.
We already have a shutdown hook at the level above which enables the caller to block until work has finished on the entries they've added, it would be good to extend that to allow storage implementation to signal when their background processes have also safely completed.
Description
Instances of storage lifecycle objects usually create background goroutines to perform various operations asynchronously. Currently, these are generally signaled to exit via context cancellation.
This is mostly fine, but occasionally causes issues in tests when things run on longer than they should.
We already have a shutdown hook at the level above which enables the caller to block until work has finished on the entries they've added, it would be good to extend that to allow storage implementation to signal when their background processes have also safely completed.