Cannot expire multicommit data points
Categories
(Tree Management :: Perfherder, defect, P1)
Tracking
(Not tracked)
People
(Reporter: igoldan, Assigned: igoldan)
References
(Regression)
Details
Attachments
(1 file, 1 obsolete file)
Sarah Clements pointed out we have this error showing up on treeherder-prototype:
Failed to delete performance data chunk: (Exception: (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (`treeherder`.`perf_multicommitdatum`, CONSTRAINT `perf_multicommitdatu_perf_datum_id_c2d7eb14_fk_performan` FOREIGN KEY (`perf_datum_id`) REFERENCES `performance_datum` (`ID`))'))
Looking closer on Papertrail, I can see it reproduces identically on all our environments, including production.
Most likely, this bug was added during the multicommit ingestion feature (namely bug 1654496).
It seems like when we're deleting multicommit data points from performance_datum
table, the process somehow stumbles upon the perf_multicommitdatum
table.
perf_multicommitdatum
is a temporary table we added just to be able to revert the feature, in case we found it buggy in the 1st month. Approximately 2 months have passed since.
Assuming it is still working ok, we should also consider removing this table.
Jira issue: https://jira.mozilla.com/browse/FXP-1430
Assignee | ||
Comment 1•4 years ago
|
||
Doing a bit of research, I came across this SO thread. Turns out Django's on_delete=models.CASCADE
is not setup at SQL database level (when the migration is done). It's only kept at Django's ORM level. This can explain the unexpected behavior.
Still, one would expect Django's models.Model.delete()
should still handle this...
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Comment 2•4 years ago
|
||
Comment 3•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Description
•