Repository navigation
Replace GetInstalled with result.LockFile.Libraries - #7216
Conversation
5ac7c7c to
f9289be
Compare
donnie-msft
left a comment
There was a problem hiding this comment.
My understanding of the change is that it's unlikely to encounter a race condition while pulling from the assets file, but we know it is (rarely) possible when querying the RestoreGraph in memory?
Co-authored-by: Donnie Goodson <[email protected]>
For the purposes of this PR, "installs package" really means, adds the package to the global packages folder. There's no race condition in the assets file. GetAllInstalled on the other hand, explicitly handles the scenario where the current operation installed the package |
Bug
Fixes: NuGet/Home#10935
Description
Sometimes, when there's many resolvers trying to download the same there'll be a race condition.
Effectively, 2 restores will be set-up and configured early, but one will complete with the full restore before the other gets to the resolver itself.
This is extremely uncommon, even if you configure lots of concurrent restores, most of the time, the restores will end up even reusing the same tasks (cause we sync the http requests).
In here, I'm changing it to an approach to determine that a package has been successfully installed in a different way.
PR Checklist
Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.