Fixes #3877 - Missing ticket updates on high load in MariaDB/MySQL environments.
This commit is contained in:
parent
e7355e6d92
commit
2b532fe414
1 changed files with 7 additions and 0 deletions
|
@ -6,6 +6,13 @@ when 'mysql2'
|
||||||
Rails.application.config.db_case_sensitive = false
|
Rails.application.config.db_case_sensitive = false
|
||||||
Rails.application.config.db_like = 'LIKE'
|
Rails.application.config.db_like = 'LIKE'
|
||||||
Rails.application.config.db_null_byte = true
|
Rails.application.config.db_null_byte = true
|
||||||
|
|
||||||
|
# Because of missing ticket updates in high load environments
|
||||||
|
# we changed the transaction isolation level equally to postgres
|
||||||
|
# to READ COMMITTED which fixed the problem entirely #3877
|
||||||
|
ActiveRecord::ConnectionAdapters::Mysql2Adapter.set_callback :checkout, :before do |conn|
|
||||||
|
conn.execute('SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED')
|
||||||
|
end
|
||||||
when 'postgresql'
|
when 'postgresql'
|
||||||
Rails.application.config.db_4bytes_utf8 = true
|
Rails.application.config.db_4bytes_utf8 = true
|
||||||
Rails.application.config.db_case_sensitive = true
|
Rails.application.config.db_case_sensitive = true
|
||||||
|
|
Loading…
Reference in a new issue