The final config calculation code does not require a lock, only writing it back
does require one.
Details
Details
- Reviewers
marmoute mharbison72 - Group Reviewers
hg-reviewers - Commits
- rHG17176f64a03d: upgrade: take lock only for part where it's required
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
Event Timeline
Comment Actions
When upgrading, we need to read the requirements -with- the lock. Otherwise we can be raced by another process upgrading the requirements.
Comment Actions
The requirements which we are reading here are source repository requirements. Hence the lock was no-op here. To prevent race condition, we will need to lock the source repository. Locking source repository on a command run by share sounded like a bad idea to me and hence left it.
Comment Actions
ah, I see.
However, we are mixing it with the current requirements, so we should re-read the current requirements under lock.
Comment Actions
Am I fine with the required fix being a follow up and such follow up now exist. So I think we are good to go.
(code could be a bit clearer, but nothing blocking)