Skip to content

[POSIX] Fixed symlinking partial tiles#972

Merged
mhutchinson merged 1 commit into
transparency-dev:mainfrom
mhutchinson:bug/posix-symlink
Jun 1, 2026
Merged

[POSIX] Fixed symlinking partial tiles#972
mhutchinson merged 1 commit into
transparency-dev:mainfrom
mhutchinson:bug/posix-symlink

Conversation

@mhutchinson
Copy link
Copy Markdown
Contributor

The POSIX storage driver in writeTile cleanup failed to clean up old partial tiles due to two path-resolution bugs:

  1. it ran filepath.Glob using relative tile paths, causing searches to resolve relative to the process's current working directory (CWD) instead of the log storage root
  2. it created symlinks pointing to tPath (e.g., tile/0/000), which became broken once renamed into the .p/ subdirectory (resolving as tile/0/000.p/tile/0/000).

Fixed these bugs by prepending the storage root to all glob and temp paths to ensure CWD independence, calculating the correct relative target pointing from the symlink directory to the full tile using filepath.Rel.

The POSIX storage driver in `writeTile` cleanup failed to clean up old partial tiles due to two path-resolution bugs:
 1. it ran `filepath.Glob` using relative tile paths, causing searches to resolve relative to the process's current working directory (CWD) instead of the log storage root
 2. it created symlinks pointing to `tPath` (e.g., `tile/0/000`), which became broken once renamed into the `.p/` subdirectory (resolving as `tile/0/000.p/tile/0/000`).

Fixed these bugs by prepending the storage root to all glob and temp paths to ensure CWD independence, calculating the correct relative target pointing from the symlink directory to the full tile using `filepath.Rel`.
@mhutchinson mhutchinson requested a review from a team as a code owner June 1, 2026 09:55
@mhutchinson mhutchinson requested a review from roger2hk June 1, 2026 09:55
@mhutchinson mhutchinson requested a review from AlCutter June 1, 2026 09:55
@mhutchinson mhutchinson merged commit 7d7ad3d into transparency-dev:main Jun 1, 2026
19 checks passed
@mhutchinson mhutchinson deleted the bug/posix-symlink branch June 1, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants