This minimal example triggers T2019
Details
tox -e py3 -- -k TestStorageRaceConditions
Diff Detail
- Repository
- rDSTO Storage manager
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tox/655/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tox/655/console
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tox/656/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tox/656/console
swh/storage/tests/test_storage.py | ||
---|---|---|
4049–4050 | For your information, the test also fails when not providing the db and cur parameter. Are they really needed ? |
swh/storage/tests/test_storage.py | ||
---|---|---|
4049–4050 | They are not really (in the current state of this code). Technically, to be sure that the race condition triggers all the time, we need to add a synchronization point between the threads, so that we are sure that both transactions are open at the same time. This means synchronizing before the content_add call, but after db.transaction(). |
Build is green
See https://jenkins.softwareheritage.org/job/DSTO/job/tox/658/ for more details.
Build is green
See https://jenkins.softwareheritage.org/job/DSTO/job/tox/659/ for more details.