Deadlock error in notes_on_merge_requests_spec test
Not sure if this is the right place to log issues with the test cases, but I have been running into this regularly while running the RSpec tests.
rspec spec/features/notes_on_merge_requests_spec.rb
...
Failures:
1) Comments On a merge request when editing a note deleting an attachment removes the attachment div and resets the edit form
Failure/Error: Unable to find matching line from backtrace
ActiveRecord::StatementInvalid:
Mysql2::Error: Deadlock found when trying to get lock; try restarting transaction: UPDATE `notes` SET `attachment` = '', `st_diff` = NULL, `updated_at` = '2015-04-29 18:21:33' WHERE `notes`.`id` = 1
# ./app/controllers/projects/notes_controller.rb:57:in `delete_attachment'
# ./lib/gitlab/middleware/static.rb:9:in `call'
Finished in 37.14 seconds
14 examples, 1 failure
Good description of what this error means here:
http://thushw.blogspot.in/2010/11/mysql-deadlocks-with-concurrent-inserts.html
I managed to catch the entire DB trace here:
cc: @DouweM