Closed
Bug 1389548
Opened 8 years ago
Closed 7 years ago
Fix MySQL warning about bugscache fulltext index ("InnoDB rebuilding table to add column FTS_DOC_ID")
Categories
(Tree Management :: Treeherder, enhancement, P3)
Tree Management
Treeherder
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: emorley, Assigned: emorley)
References
Details
Attachments
(1 file)
Seen whilst running `PYTHONWARNINGS=once pytest` from the Vagrant environment.
tests/test_setup.py::test_no_missing_migrations
/home/vagrant/python/lib/python2.7/site-packages/django/db/backends/mysql/base.py:101: Warning: ('124', 'InnoDB rebuilding table to add column FTS_DOC_ID')
return self.cursor.execute(query, args)
This is triggered during the migrations that are run for each test:
https://github.com/mozilla/treeherder/blob/63a6692e718e2a4776a948ce85f5c18177f36ce6/treeherder/model/migrations/0001_squashed_0053_add_job_platform_option_push_index.py#L661-L665
See:
https://dev.mysql.com/doc/refman/5.7/en/innodb-fulltext-index.html#innodb-fulltext-index-docid
This warning is mostly not relevant to us, since for the tests, the table is empty at the time the fulltext index is added, so the cost of adding the FTS_DOC_ID is minimal. And in production, the fulltext index has existed forever, so not a problem.
Options appear to be:
1) Just suppress the warning (eg `sql_notes = 0` whilst running that manual SQL, and I guess having to set it back to `1` again after, since otherwise it will persist for the re-used session)
2) Create the index at the same time as the table, either by:
(a) Moving the entire table creation to manual SQL.
(b) Trying to add fulltext index support to the Django ORM. Though this was ~wontfixed (https://code.djangoproject.com/ticket/26990) so would mean custom Django classes living in Treeherder or similar, so probably not worth it.
Assignee | ||
Updated•8 years ago
|
Component: Treeherder → Treeherder: Docs & Development
Comment 1•7 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder
https://github.com/mozilla/treeherder/commit/4dee8425d98d5faa899c52a825b82915632df2f2
Bug 1389548 - Fix MySQL warning about rebuilding bugscache table
Avoids this warning being printed after every pytest invocation:
`Warning: ('124', 'InnoDB rebuilding table to add column FTS_DOC_ID')`
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → emorley
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder
https://github.com/mozilla/treeherder/commit/5f2cc87d7647169ead5e4aece2523ab92afa9ec5
Bug 1389548 - Vagrant: Remove migrate stderr redirect (#3442)
The workaround is no longer required now that the MySQL warning
has been suppressed in the migration file itself.
Updated•4 years ago
|
Component: Treeherder: Docs & Development → TreeHerder
You need to log in
before you can comment on or make changes to this bug.
Description
•