golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
121.77k stars 17.41k forks source link

x/telemetry: write the weekends file atomically #68390

Open findleyr opened 3 weeks ago

findleyr commented 3 weeks ago

In https://go.dev/cl/597278, we see test failures because the new TestConcurrentExtension starts multiple subprocesses both initializing the telemetry directory simultaneously. This exercises a race to writing the weekends file.

This race was known; I started work on a fix in https://go.dev/cl/587635 that didn't make the 1.23 freeze. While this is not critical--in the steady state, the weekends file already exists--we should fix for 1.24 to avoid this type of trickiness in tests.

gopherbot commented 3 weeks ago

Change https://go.dev/cl/597835 mentions this issue: internal/counter: write the weekends file atomically