This repository was archived by the owner on Nov 4, 2022. It is now read-only.

Description
Hi
I realize that having stenographer use multiple threads witing to different directories on the same underlying disk may not be a supported use case.
But I really do have a viable use for this.
In such a setup, the automatic disk cleanup does not work as intended since cleanup is done in serial per thread. The first thread to do cleanup will then take on the burden of cleaning files until the desired percentage of free space is achieved. Only if the first thread has no more files left to delete will other threads using the same disk begin deleting their files.
I think there are 2 viable solutions:
-
quick and dirty - randomize the order in which threads calls SyncFiles(). This will work fairly well as long as the threads write equal amounts of data.
-
more complex - move deletion to Env and delete files alternatingly.
I already have a fork with solution 1) that I could turn into a PR if you would like it.