Add Transactional mode for WriteLinesToFile#12627
Conversation
…-WriteLinesToFile
|
I'm not sure we should introduce a new Transactional element on the task XML. Instead we should probably have an environment variable to opt into this. Longer term after a lot of testing we should make it the default. After another long time we should delete the non-transactional branch. |
…teLinesToFileUpToDateStop to parent function, remove unused message and update some logic
…ToFile' of https://github.com/huulinhnguyen-dev/msbuild into dev/huulinhnguyen/add-transactional-mode-for-WriteLinesToFile
…-WriteLinesToFile
I would make it the default now, but behind a changewave so if it causes problems a user can report it then turn it off while we figure out what to change. |
…-WriteLinesToFile
…-WriteLinesToFile
…-WriteLinesToFile
…ToFile' of https://github.com/huulinhnguyen-dev/msbuild into dev/huulinhnguyen/add-transactional-mode-for-WriteLinesToFile
…nd remove mutex implmentation
efe3a58 to
698b421
Compare
…ToFile' of https://github.com/huulinhnguyen-dev/msbuild into dev/huulinhnguyen/add-transactional-mode-for-WriteLinesToFile
90a82a8 to
b5bb9a2
Compare
…ToFile' of https://github.com/huulinhnguyen-dev/msbuild into dev/huulinhnguyen/add-transactional-mode-for-WriteLinesToFile
1fdb03f to
816ca09
Compare
There was a problem hiding this comment.
I saw several places where I'm seeking additional clarification.
The only change I think will be necessary is to update the changewave - though I'll defer that decision to @baronfel . The rest are more of a discussion openers.
Other than that I have few places that I'm suspicious about. This is not the fault of your implementation but with the overall Task design.
|
A new change wave is 100% required - after a release we should essentially never add to that change wave. |
…-WriteLinesToFile
…-WriteLinesToFile
Fixes #
Add Transactional mode for WriteLinesToFile to allow multiple projects attempt to write to the same file simultaneously #12061
Context
The WriteLinesToFile MSBuild task encountered errors during parallel builds due to multiple MSBuild.exe processes attempting to write to the same file concurrently. This PR enhances the Transactional mode to ensure atomic file operations
Changes Made
Testing
Test was performed by using 8 project files at the same time, trying to write to one file with Transactional = true.
Notes