Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for rare infinite loop on mutex acquisition #2012

Merged
merged 1 commit into from
Jan 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,14 @@ jobs:
secureFile: 'ci-gcs-dev.json'
- script: |
pip install azure-storage-blob==12.12.0
# set the variable to indicate that the mutex is being acquired
# note: we set it before acquiring the mutex to ensure we release the mutex.
# setting this after can result in an un-broken mutex if someone cancels the pipeline after we acquire the
# mutex but before we set this variable.
# setting this before will always work since it is valid to break an un-acquired mutex.
echo '##vso[task.setvariable variable=isMutexSet]true'
# acquire the mutex before running live tests to avoid conflicts
python ./tool_distributed_mutex.py lock "$(MUTEX_URL)"
# set the variable to indicate that the mutex was actually acquired
echo '##vso[task.setvariable variable=isMutexSet]true'
name: 'Acquire_the_distributed_mutex'
- script: |
# run unit test and build executable
Expand Down