add releases_history index to balrog's model

RESOLVED FIXED

Status

RESOLVED FIXED
6 years ago
7 months ago

People

(Reporter: bhearsum, Assigned: bhearsum)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Sheeri added an index to this table in bug 830346. We should get the index into the sqlalchemy model to make sure local tests are similar and that we don't forget about it completely.
From bug 830346:
(In reply to Sheeri Cabral [:sheeri] from comment #20)
> Sure!
> 
> (I ran this on my tablet last night, otherwise I usually copy and paste
> stuff into the bug)
> 
> ALTER TABLE aus4_dev.releases_history add index(timestamp);
> 
> it took 27 minutes on dev2 and 28 minutes on dev1, just for my own
> information.
> 
> Also, the table rebuild showed the table had no (or very little)
> fragmentation:
> 
> [root@dev1.db.phx1 aus4_dev]# ls -lrth releases_history.*
> -rw-rw---- 1 mysql mysql 8.7K Feb 15 02:26 releases_history.frm
> -rw-rw---- 1 mysql mysql  55G Feb 15 02:47 releases_history.MYD
> -rw-rw---- 1 mysql mysql 7.7M Feb 15 02:55 releases_history.MYI
Created attachment 714457 [details] [diff] [review]
implement downgrades; add index

This index was added to the dev db by hand in bug 830346. I'll need to update the migrate_version in that db after this lands, otherwise we'll get a failure next time we try to do an upgrade to the schema through manage_db.py.
Attachment #714457 - Flags: review?(catlee)
Attachment #714457 - Flags: review?(catlee) → review+

Comment 3

6 years ago
Commit pushed to master at https://github.com/mozilla/balrog

https://github.com/mozilla/balrog/commit/48b6165fc837312ab67989b5e3fd1d06ddcc20e7
bug 841721: add releases_history index to balrog's model. r=catlee
Depends on: 842552
Comment on attachment 714457 [details] [diff] [review]
implement downgrades; add index

Landed. Couldn't update the table yet because of bug 842552.
Attachment #714457 - Flags: checked-in+
Turns out that was user error. I got it updated:
mysql> select * from migrate_version;
+---------------+-----------------+---------+
| repository_id | repository_path | version |
+---------------+-----------------+---------+
| balrog        | auslib/migrate  |       3 |
+---------------+-----------------+---------+
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Product: mozilla.org → Release Engineering
Component: General Automation → General
Product: Release Engineering → Release Engineering
You need to log in before you can comment on or make changes to this bug.