ihmeuw-scicomp / jobmon

Other
3 stars 6 forks source link

proposed use of with_for_update to prevent deadlocks on update #114

Closed Kevinoh47 closed 4 months ago

Kevinoh47 commented 5 months ago

This is an attempt to prevent deadlocks on updates by selecting the rows to be updated first using the with_for_update method, which should set intent locks before the update statement is run.

This needs to be tested.

If it succeeds, this pattern could be used elsewhere.

I have attempted to use it in set_status_for_triaging, which is throwing a large number of deadlocks.

github-actions[bot] commented 4 months ago

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  jobmon_server/src/jobmon/server/web/routes/v2/fsm
  workflow_run.py 324-340
Project Total  

This report was generated by python-coverage-comment-action

github-actions[bot] commented 4 months ago

Test Results

220 tests  ±0   215 :white_check_mark: ±0   18m 30s :stopwatch: -5s   1 suites ±0     5 :zzz: ±0    1 files   ±0     0 :x: ±0 

Results for commit cbb0d3f7. ± Comparison against base commit decb2804.

Kevinoh47 commented 4 months ago

This PR has been superseded by https://github.com/ihmeuw-scicomp/jobmon/pull/117, although the updates intended for that PR also found there way into this one and the tests passed for both PRs. I am closing this one to make room for the latter one.