[Bug debuginfod/26125] during debuginfod cache cleanup, try harder to rmdir empty dirs

fche at redhat dot com sourceware-bugzilla@sourceware.org
Mon Nov 30 12:47:02 GMT 2020


--- Comment #7 from Frank Ch. Eigler <fche at redhat dot com> ---
> I wonder if there is some way around it using temp names for the directories,
> like we do for the actual file names, so that we can atomically rename them
> in-place.

I couldn't think of one without other drawbacks.  There can be races between
two clients downloading info for the same buildid, thus creating two temp dirs.
 One of them would not be able to rename to the final name.

Another simplish approach would be to check the directory mtime before rmdir,
to ensure it's old, plus adding a retry loop at cache-insertion, in case a
client loses the maxage_s race with a cleanup.  But it would only lose it
once (due to the mtime check).

You are receiving this mail because:
You are on the CC list for the bug.

More information about the Elfutils-devel mailing list