Commit f3a74e67 authored by Dylan Griffith's avatar Dylan Griffith

Improve error messaging for misaligned transaction

parent 453dd32c
...@@ -58,7 +58,7 @@ module Gitlab ...@@ -58,7 +58,7 @@ module Gitlab
context[:modified_tables_by_db][database].clear context[:modified_tables_by_db][database].clear
elsif context[:transaction_depth_by_db][database] < 0 elsif context[:transaction_depth_by_db][database] < 0
context[:transaction_depth_by_db][database] = 0 context[:transaction_depth_by_db][database] = 0
raise CrossDatabaseModificationAcrossUnsupportedTablesError, "Something bad happened as we have misaligned transactions." raise CrossDatabaseModificationAcrossUnsupportedTablesError, "Misaligned cross-DB transactions discovered at query #{sql}. This could be a bug in #{self.class} or a valid issue to investigate. Read more at https://docs.gitlab.com/ee/development/database/multiple_databases.html#removing-cross-database-transactions ."
end end
return return
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment