Closed Bug 575760 Opened 14 years ago Closed 14 years ago

database deadlock

Categories

(Socorro :: General, task)

x86
Linux
task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lars, Unassigned)

Details

at 10:05am on Tuesday, June 29, there was a database deadlock that stopped a processor.  

It happened when the createPartititions cron was running and involved the plugin_reports partitioned table. 

We figure that it was involved with processor.py:839 rolling back a transaction, but the details have not been worked out.  Since this code has run for a very long time without trouble, I'm assuming it is an unfortunate coincidence.  It may happen again, but it is of low priority because just restarting the processor resolved the trouble.

However, the plugin_reports partition for 2010-07-26 did not get created.  It should get created  manually: 

CREATE TABLE plugins_reports_20100726 (
    CONSTRAINT plugins_reports_20100726_date_check CHECK 
       (TIMESTAMP without time zone '2010-07-26' <= date_processed and date_processed < TIMESTAMP without time zone '2010-08-02'),
    PRIMARY KEY (report_id, plugin_id)
)
INHERITS (plugins_reports);

CREATE INDEX plugins_reports_20100726_report_id_date_key ON plugins_reports_20100726 (report_id, date_processed, plugin_id);

ALTER TABLE plugins_reports_20100726
    ADD CONSTRAINT plugins_reports_20100726_report_id_fkey FOREIGN KEY (report_id) REFERENCES reports_20100726(id) ON DELETE CASCADE;

ALTER TABLE plugins_reports_20100726
    ADD CONSTRAINT plugins_reports_20100726_plugin_id_fkey FOREIGN KEY (plugin_id) REFERENCES plugins(id) ON DELETE CASCADE;
Done!
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Component: Socorro → General
Product: Webtools → Socorro
You need to log in before you can comment on or make changes to this bug.