You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running a multi-process test run on Linux, I'm seeing the system hang as part of the truncate_tables call in database_tasks.rb. It seems that the problem is around abandon_results!, which waits for a timeout to proceed. Here's the backtrace when I halt execution:
activerecord/lib/active_record/connection_adapters/mysql2/database_statements.rb:63:in `abandon_results!': Interrupt
activerecord/lib/active_record/connection_adapters/mysql2/database_statements.rb:63:in `block (2 levels) in execute_batch'
activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:997:in `block in with_raw_connection'
activesupport/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:969:in `with_raw_connection'
activerecord/lib/active_record/connection_adapters/mysql2/database_statements.rb:61:in `block in execute_batch'
activerecord/lib/active_record/connection_adapters/mysql2/database_statements.rb:60:in `each'
activerecord/lib/active_record/connection_adapters/mysql2/database_statements.rb:60:in `execute_batch'
activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:230:in `block (2 levels) in truncate_tables'
activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:219:in `disable_referential_integrity'
activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:228:in `block in truncate_tables'
activerecord/lib/active_record/connection_adapters/mysql2/database_statements.rb:94:in `block in with_multi_statements'
activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:997:in `block in with_raw_connection'
activesupport/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:969:in `with_raw_connection'
activerecord/lib/active_record/connection_adapters/mysql2/database_statements.rb:91:in `with_multi_statements'
activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:227:in `truncate_tables'
activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:26:in `truncate_tables'
activerecord/lib/active_record/tasks/database_tasks.rb:226:in `block in truncate_tables'
activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:399:in `with_connection'
activerecord/lib/active_record/tasks/database_tasks.rb:514:in `block in with_temporary_connection'
activerecord/lib/active_record/tasks/database_tasks.rb:546:in `with_temporary_pool'
activerecord/lib/active_record/tasks/database_tasks.rb:513:in `with_temporary_connection'
activerecord/lib/active_record/tasks/database_tasks.rb:225:in `truncate_tables'
First instinct was to just make truncate_tables optionally via a toggle. Truncation is only needed if you have tests that don't run inside the default transaction, which is rare. But while that might still make sense for an additional speedup (truncating tables still takes time, even if it's executing normally), we surely should fix the underlying issue.
When running a multi-process test run on Linux, I'm seeing the system hang as part of the
truncate_tables
call in database_tasks.rb. It seems that the problem is around abandon_results!, which waits for a timeout to proceed. Here's the backtrace when I halt execution:First instinct was to just make
truncate_tables
optionally via a toggle. Truncation is only needed if you have tests that don't run inside the default transaction, which is rare. But while that might still make sense for an additional speedup (truncating tables still takes time, even if it's executing normally), we surely should fix the underlying issue.The truncate call was introduced by @jhawthorn in d8b8171.
The text was updated successfully, but these errors were encountered: