Skip to content

Conversation

@dg0yt
Copy link
Contributor

@dg0yt dg0yt commented May 3, 2025

Fixes 10.1 seconds delay for each file write operation across devices, e.g. for FilesWriteBinaryProvider.
Fixes microsoft/vcpkg#45130.

@dg0yt dg0yt force-pushed the rename_or_delete branch from 05df491 to 664ef4e Compare May 3, 2025 20:24
Comment on lines -2041 to +2042
ec == std::make_error_condition(std::errc::file_exists) || this->exists(new_path, ec))
ec == std::make_error_condition(std::errc::file_exists) || this->exists(new_path, local_ec))
Copy link
Contributor Author

@dg0yt dg0yt May 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overwriting ec here broke reaching the early return false for std::errc::cross_device_link in the next if else block.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose to use a separate variable to be safe for future additions.
And I just found that such a "future addition" already happened in the past: #1659.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW the forced formatting didn't let me put the trailing this->exists on a new line were it would be much more obvious...

Copy link
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@BillyONeal BillyONeal merged commit 24c3316 into microsoft:main May 5, 2025
7 checks passed
@dg0yt dg0yt deleted the rename_or_delete branch May 5, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[vcpkg-tool] Slow binary cache submission due to rename() EXDEV retries

2 participants