Skip to content

[9.1.0] Fix disk cache failures on concurrent read-write access on Windows (h…#28555

Merged
iancha1992 merged 2 commits intobazelbuild:release-9.1.0from
iancha1992:cp28457
Feb 25, 2026
Merged

[9.1.0] Fix disk cache failures on concurrent read-write access on Windows (h…#28555
iancha1992 merged 2 commits intobazelbuild:release-9.1.0from
iancha1992:cp28457

Conversation

@iancha1992
Copy link
Member

…ttps://github.com//pull/28417)

This applies the fix made to the download cache in 753dc97 to the disk cache.

Work towards #28408

Closes #28417.

PiperOrigin-RevId: 864861790
Change-Id: I6850fc27f3336f44f8d366daac63e4822cb94f73

Commit 73c8da8

…azelbuild#28417)

This applies the fix made to the download cache in 753dc97 to the disk cache.

Work towards bazelbuild#28408

Closes bazelbuild#28417.

PiperOrigin-RevId: 864861790
Change-Id: I6850fc27f3336f44f8d366daac63e4822cb94f73
@iancha1992 iancha1992 requested a review from coeuvre February 5, 2026 20:41
@iancha1992 iancha1992 requested a review from a team as a code owner February 5, 2026 20:41
@iancha1992 iancha1992 added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. team-Remote-Exec Issues and PRs for the Execution (Remote) team awaiting-review PR is awaiting review from an assigned reviewer labels Feb 5, 2026
@iancha1992 iancha1992 enabled auto-merge February 5, 2026 20:41
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively addresses a concurrency issue on Windows related to disk cache access. The core of the change is the introduction of the FileSystemUtils.renameToleratingConcurrentCreation method, which correctly handles FileAccessException during file renames in a concurrent environment. This logic has been cleanly refactored from DownloadCache and applied to DiskCacheClient, resolving the bug. The changes are well-supported by new, thorough unit tests and a concurrency test that specifically targets the race condition. The overall implementation is robust and improves code maintainability by centralizing the fix in a reusable utility.

@iancha1992 iancha1992 added this pull request to the merge queue Feb 25, 2026
Merged via the queue into bazelbuild:release-9.1.0 with commit e816764 Feb 25, 2026
45 checks passed
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. team-Remote-Exec Issues and PRs for the Execution (Remote) team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants