Close replication task streams after use
Unclosed directory streams can retain open directory handles while
task storage is scanned. Close the running-task stream during recovery
and require callers of the waiting/running stream APIs to manage the
resource explicitly.
Update storage tests and integration helpers to use try-with-resources,
and add a regression test that verifies recovery closes its stream.
Release-Notes: Prevent directory-stream leaks in task storage
Change-Id: I1ea61ae9a428aa61765c8f28a3ff7f8455356920
5 files changed