| ... | ... | @@ -1569,6 +1569,10 @@ const poll_buffer_len = 64; |
| 1569 | 1569 | pub const default_PATH = "/usr/local/bin:/bin:/usr/bin"; |
| 1570 | 1570 | /// There are multiple kernel bugs being worked around with retries. |
| 1571 | 1571 | const max_windows_kernel_bug_retries = 13; |
| 1572 | /// Similar in nature to `max_windows_kernel_bug_retries`, but much more likely to |
| 1573 | /// be a real error that won't go away after a retry, so the number of retries |
| 1574 | /// is lower. |
| 1575 | const max_windows_rename_retries = 3; |
| 1572 | 1576 | |
| 1573 | 1577 | comptime { |
| 1574 | 1578 | if (@TypeOf(posix.IOV_MAX) != void) assert(max_iovecs_len <= posix.IOV_MAX); |
| ... | ... | @@ -7738,7 +7742,7 @@ fn dirRenameWindowsInner( |
| 7738 | 7742 | }, |
| 7739 | 7743 | .ACCESS_DENIED => { |
| 7740 | 7744 | syscall.finish(); |
| 7741 | | if (max_windows_kernel_bug_retries - attempt == 0) break :need_fallback false; |
| 7745 | if (max_windows_rename_retries - attempt == 0) break :need_fallback false; |
| 7742 | 7746 | try parking_sleep.sleep(.{ .duration = .{ |
| 7743 | 7747 | .raw = .fromMilliseconds((@as(u32, 1) << attempt) >> 1), |
| 7744 | 7748 | .clock = .awake, |
| ... | ... | @@ -7775,7 +7779,7 @@ fn dirRenameWindowsInner( |
| 7775 | 7779 | .CANCELLED => try syscall.checkCancel(), |
| 7776 | 7780 | .ACCESS_DENIED => { |
| 7777 | 7781 | syscall.finish(); |
| 7778 | | if (max_windows_kernel_bug_retries - attempt == 0) break; |
| 7782 | if (max_windows_rename_retries - attempt == 0) break; |
| 7779 | 7783 | try parking_sleep.sleep(.{ .duration = .{ |
| 7780 | 7784 | .raw = .fromMilliseconds((@as(u32, 1) << attempt) >> 1), |
| 7781 | 7785 | .clock = .awake, |