fix: use fail-open for directory marker check in empty-folder cleaner

The isDirectoryMarker check used fail-closed behavior: any transient
error from GetEntryAttributes would permanently cache the folder as a
directory marker, blocking cleanup forever.

Change to fail-open: on transient errors, allow deletion to proceed
and don't cache the result so it can be retried on the next cycle.
This is safe because directory markers are intentional objects that
users can recreate, while blocked cleanup causes silent data leaks.

Also increase the Spark test cleanup timeout from 35s to 60s to
accommodate cascading multi-level directory cleanup with the
additional store lookups.
This commit is contained in:
Chris Lu committed 2026-03-21 14:54:31 -07:00
1 parent fe9734a504
commit f60ab97b2e
2 files changed
+26 -19

No files matched your search

+1 -1
View File
@@ -70,7 +70,7 @@ print("WRITE_COUNT=" + str(count))
"issue-8285/output/_temporary/0/",
"issue-8285/output/_temporary/0/_temporary/",
}
lingering := waitForObjectsToDisappear(t, env, "test", temporaryCandidates, 35*time.Second)
lingering := waitForObjectsToDisappear(t, env, "test", temporaryCandidates, 60*time.Second)
if len(lingering) > 0 {
t.Fatalf("issue #8285 regression detected: lingering temporary directories: %v", lingering)
}