Debugging MySQL lock errors in Ruby on Rails
19-Jul-2019 2327
To achieve data consistency MySQL applies a set of quite complex rules for locking. It is possible that more rows get locked than one might expect. Especially when there is a lack of relevant database indexes.For example the following Rails code performs an update that locks the whole table if the name field does not have an index.
Debugging MySQL lock errors in Ruby on Rails #ruby #rubydeveloper #rubyonrails #Debugging #MySQL #errors #Rails #errors #mysql https://rubyonrails.ba/link/debugging-mysql-lock-errors-in-ruby-on-rails