Closed
Bug 1304332
Opened 8 years ago
Closed 8 years ago
Differences in the performance_signature table schema between environments
Categories
(Tree Management :: Perfherder, defect, P2)
Tree Management
Perfherder
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: emorley, Assigned: wlach)
References
Details
Attachments
(1 file)
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Reporter | ||
Comment 2•8 years ago
|
||
Updated diff:
--- schema-vagrant.sql
+++ schema-prod.sql
...
CREATE TABLE `performance_signature` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`signature_hash` varchar(40) COLLATE utf8_bin NOT NULL,
`suite` varchar(80) COLLATE utf8_bin NOT NULL,
`test` varchar(80) COLLATE utf8_bin NOT NULL,
`lower_is_better` tinyint(1) NOT NULL,
`last_updated` datetime(6) NOT NULL,
`has_subtests` tinyint(1) NOT NULL,
`extra_options` varchar(60) COLLATE utf8_bin NOT NULL,
`should_alert` tinyint(1) DEFAULT NULL,
`alert_threshold` double DEFAULT NULL,
`min_back_window` int(11) DEFAULT NULL,
`max_back_window` int(11) DEFAULT NULL,
`fore_window` int(11) DEFAULT NULL,
`framework_id` int(11) NOT NULL,
`option_collection_id` int(11) NOT NULL,
`parent_signature_id` int(11) DEFAULT NULL,
`platform_id` int(11) NOT NULL,
`repository_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `<NAME>` (`repository_id`,`framework_id`,`signature_hash`),
KEY `<NAME>` (`framework_id`),
KEY `<NAME>` (`option_collection_id`),
KEY `<NAME>` (`parent_signature_id`),
KEY `<NAME>` (`platform_id`),
- KEY `<NAME>` (`signature_hash`),
KEY `<NAME>` (`last_updated`),
+ KEY `<NAME>` (`suite`,`test`,`lower_is_better`,`repository_id`,`framework_id`,`platform_id`,`option_collection_id`),
CONSTRAINT `<NAME>` FOREIGN KEY (`parent_signature_id`) REFERENCES `performance_signature` (`id`),
CONSTRAINT `<NAME>` FOREIGN KEY (`option_collection_id`) REFERENCES `option_collection` (`id`),
CONSTRAINT `<NAME>` FOREIGN KEY (`framework_id`) REFERENCES `performance_framework` (`id`),
CONSTRAINT `<NAME>` FOREIGN KEY (`platform_id`) REFERENCES `machine_platform` (`id`),
CONSTRAINT `<NAME>` FOREIGN KEY (`repository_id`) REFERENCES `repository` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Reporter | ||
Comment 3•8 years ago
|
||
Couple of questions:
* Prod is missing the index on `signature_hash` - I'm presuming we want that index (so should add it instead of adjusting the model)
* Prod has an extra composite index not in the model - do we need it (and so should add it to the model)? The index:
(`suite`,`test`,`lower_is_better`,`repository_id`,`framework_id`,`platform_id`,`option_collection_id`)
Flags: needinfo?(wlachance)
Assignee | ||
Comment 4•8 years ago
|
||
Hmm, to be honest I can't remember making these changes. :)
I would be inclined to reset things to match the vagrant instance on stage and validate that things are still reasonably fast. If there are issues (i.e. we were actually depending on the index), we can add it to the model. I'll do this sometime this week, leaving NI open so I don't forget.
Reporter | ||
Comment 5•8 years ago
|
||
It it helps, I've just checked stage and for indexes it's the same as prod (additional composite index, and missing the `signature_hash` index), albeit the column definitions vary slightly.
Assignee | ||
Comment 6•8 years ago
|
||
This fell down in my priority list, but I will pick it up next week, promise.
Comment 7•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → wlachance
Flags: needinfo?(wlachance)
Assignee | ||
Comment 8•8 years ago
|
||
Comment on attachment 8836753 [details]
[treeherder] wlach:1304332 > mozilla:master
Let's just do the simplest thing possible here to synchronize the two. I very much doubt the performance signature table is a bottleneck for anything (it's small).
* I have manually removed the extra index from production/stage.
* Here's a migration to remove the signature_hash index from vagrant.
Attachment #8836753 -
Flags: review?(emorley)
Reporter | ||
Comment 9•8 years ago
|
||
Comment on attachment 8836753 [details]
[treeherder] wlach:1304332 > mozilla:master
> * I have manually removed the extra index from production/stage.
Prototype too? :-)
Attachment #8836753 -
Flags: review?(emorley) → review+
Reporter | ||
Comment 10•8 years ago
|
||
Thank you for looking at this :-)
Comment 11•8 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder
https://github.com/mozilla/treeherder/commit/0d55215d73806d7d4a3297c00ada63787ae1d979
Bug 1304332 - Remove index on signature_hash (#2160)
We've been happily running without it in production for a while, so
let's just remove it.
Assignee | ||
Comment 12•8 years ago
|
||
(In reply to Ed Morley [:emorley] from comment #9)
> Comment on attachment 8836753 [details]
> [treeherder] wlach:1304332 > mozilla:master
>
> > * I have manually removed the extra index from production/stage.
>
> Prototype too? :-)
No, but just took care of it!
Reporter | ||
Comment 13•8 years ago
|
||
:-D
Reporter | ||
Comment 14•8 years ago
|
||
The migration deployed fine on prod.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.