Project

General

Profile

Bug #15447

Database deadlock error

Added by Marc Mengel over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
02/02/2017
Due date:
% Done:

100%

Estimated time:
First Occurred:
Scope:
Internal
Experiment:
-
Stakeholders:
Duration:

Description

We got a deadlock in "report_declared_files", which, after discussing with Robert,
would appear to be caused by updates to the job_files table trying to put read locks on the attached "job" rows; but of course we have update_job calls going on periodically as well, which get with_for_update locks on the "job" table rows.

So I've patched it for now to try to get read locks on the Job rows first, and then try to update he "job_files" entries. I also noticed that this routine never got split out of poms_service.py, so I moved it into FilesPOMS.py while I was at it...

History

#1 Updated by Marc Mengel over 3 years ago

First stab is in f62c307becf73d

#2 Updated by Marc Mengel over 3 years ago

  • % Done changed from 0 to 90

Okay, so running with Development as a copy of Production; we had 3 deadlocks overnight in production, and none in development; so I think, possibly, that the patch we've tried is working.

#3 Updated by Marc Mengel over 3 years ago

  • Status changed from New to Resolved
  • % Done changed from 90 to 100

#4 Updated by Marc Mengel over 3 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF