Commit 92029e1
authored
Fix race condition in
## Changes
Make `LogString` write the string and newline in a single call to reduce
the likelihood of interleaved output when called concurrently. This was
atomic until #3818 where I removed the lock, assuming it wasn't
necessary.
Note: This fix assumes `io.WriteString` provides atomic writes for small
messages, which is not guaranteed.
## Why
Fixes flaky test from:
https://github.com/databricks/cli/actions/runs/18995883239/job/54255615389cmdio.LogString (#3868)1 parent aa9d438 commit 92029e1
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
| 26 | + | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| |||
0 commit comments