Commit f2d1481
committed
Don't keep the journal of a PersistentMap open
This ensures that the journal file is not kept open after a build, which has been observed to cause `RewindingTest` to fail on Windows, which disallows deleting open files (in this case during test case cleanup).
Since the journal is written out at most every 3 seconds for all current usages of the `PersistentMap` class, the overhead of the additional `open` is negligible.
Also include small tweaks to `RewindingTest` so that it can be enabled on Windows. In particular, the order of `SymlinkAction` and `SourceManifestAction` being rewound doesn't seem to be fixed and can differ on Windows.
Closes #28108.
PiperOrigin-RevId: 855242645
Change-Id: Ic7434139b290c6b0e2061977f747e890c3c5ece6
(cherry picked from commit 2be693e)1 parent 1c4243e commit f2d1481
File tree
3 files changed
+54
-56
lines changed- src
- main/java/com/google/devtools/build/lib/util
- test/java/com/google/devtools/build/lib/skyframe/rewinding
3 files changed
+54
-56
lines changedLines changed: 18 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | 86 | | |
88 | 87 | | |
89 | 88 | | |
| |||
202 | 201 | | |
203 | 202 | | |
204 | 203 | | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
215 | 221 | | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | 222 | | |
222 | 223 | | |
223 | 224 | | |
| |||
303 | 304 | | |
304 | 305 | | |
305 | 306 | | |
306 | | - | |
307 | | - | |
308 | 307 | | |
309 | 308 | | |
310 | 309 | | |
| |||
343 | 342 | | |
344 | 343 | | |
345 | 344 | | |
346 | | - | |
| 345 | + | |
347 | 346 | | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | 347 | | |
353 | 348 | | |
354 | 349 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | 78 | | |
80 | 79 | | |
81 | 80 | | |
| |||
Lines changed: 36 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1833 | 1833 | | |
1834 | 1834 | | |
1835 | 1835 | | |
| 1836 | + | |
1836 | 1837 | | |
1837 | 1838 | | |
1838 | 1839 | | |
1839 | 1840 | | |
1840 | 1841 | | |
1841 | 1842 | | |
1842 | 1843 | | |
1843 | | - | |
1844 | | - | |
1845 | | - | |
1846 | | - | |
1847 | | - | |
1848 | | - | |
1849 | | - | |
1850 | | - | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
| 1847 | + | |
| 1848 | + | |
| 1849 | + | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
| 1853 | + | |
1851 | 1854 | | |
1852 | 1855 | | |
1853 | 1856 | | |
| |||
2010 | 2013 | | |
2011 | 2014 | | |
2012 | 2015 | | |
2013 | | - | |
2014 | | - | |
| 2016 | + | |
| 2017 | + | |
2015 | 2018 | | |
2016 | 2019 | | |
2017 | 2020 | | |
2018 | | - | |
2019 | 2021 | | |
2020 | 2022 | | |
2021 | | - | |
2022 | | - | |
2023 | | - | |
2024 | | - | |
2025 | | - | |
2026 | | - | |
2027 | | - | |
2028 | | - | |
2029 | | - | |
2030 | | - | |
2031 | | - | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
2032 | 2033 | | |
2033 | 2034 | | |
2034 | 2035 | | |
2035 | 2036 | | |
2036 | 2037 | | |
2037 | 2038 | | |
2038 | | - | |
2039 | | - | |
| 2039 | + | |
| 2040 | + | |
2040 | 2041 | | |
2041 | 2042 | | |
2042 | 2043 | | |
| |||
2166 | 2167 | | |
2167 | 2168 | | |
2168 | 2169 | | |
| 2170 | + | |
2169 | 2171 | | |
2170 | 2172 | | |
2171 | 2173 | | |
2172 | 2174 | | |
2173 | 2175 | | |
2174 | 2176 | | |
2175 | 2177 | | |
2176 | | - | |
2177 | | - | |
2178 | | - | |
2179 | | - | |
2180 | | - | |
2181 | | - | |
2182 | | - | |
2183 | | - | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
| 2183 | + | |
| 2184 | + | |
| 2185 | + | |
| 2186 | + | |
| 2187 | + | |
2184 | 2188 | | |
2185 | 2189 | | |
2186 | 2190 | | |
| |||
0 commit comments