Promote develop: vfs/cache promoteToFast race fix #24

Merged
Ghost merged 2 commits from develop into main 2026-09-01 15:36:49 -05:00

Promote #23 (Stat snapshots + promote size from len(content)) so main tip is race-clean.

#21

Promote #23 (Stat snapshots + promote size from len(content)) so main tip is race-clean. https://git.s1d3sw1ped.com/s1d3sw1ped/steamcache2/issues/21
Ghost added 2 commits 2026-09-01 15:35:56 -05:00
vfs/cache: Fix promoteToFast race with WriteCloser Close
CI / vulncheck (pull_request) Successful in 14s
CI / check-and-test (pull_request) Successful in 40s
8e09c89e24
promoteToFast read FileInfo.Size from Stat after the VFS lock was
released, while WriteCloser.Close updated Size on the same live
object. Concurrent Create/Open on overlapping keys tripped the race
detector.

Stat now returns a FileInfo snapshot, and promotion uses the
ReadAll length for the fast-tier Create size. Promotion stays
best-effort.

#21
Merge pull request 'vfs/cache: Fix promoteToFast race with WriteCloser Close' (#23) from vfs/cache-promote-race into develop
CI / vulncheck (pull_request) Successful in 14s
CI / check-and-test (pull_request) Successful in 41s
523a9a4782
Stat returns FileInfo snapshots; promoteToFast sizes from len(content).

#21
Ghost merged commit 04d1c6c368 into main 2026-09-01 15:36:49 -05:00
Sign in to join this conversation.