Comments (3)
It seems that the problem is around abandon_results!, which waits for a timeout to proceed.
I don't think abandon_results!
utilizes any sort of timeout: https://github.com/brianmario/mysql2/blob/58c8190dd423779eae230e2ff803e2d0c465f67b/ext/mysql2/client.c#L821
It just tells mysql you don't care about the results of the query ("truncation" in this case) so it can move on to other things.
from rails.
When it's hanging, does mysql SHOW PROCESSLIST;
or SHOW OPEN TABLES WHERE In_use > 0;
reveal anything?
On another note, it would be interesting to benchmark this to see if there's any change to your ~10 second test run increase:
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE TABLE your_table;
SET FOREIGN_KEY_CHECKS=1;
Apparently disabling foreign key checks can greatly speedup truncation.
from rails.
Resolved via #51686
from rails.
Related Issues (20)
- ActiveRecord - `update!` and `save!` do not trigger validations neither raise exceptions with emtpy attributes. HOT 5
- non-rails project now throws "uninitialized constant #<Class:ActiveSupport::Delegation>::Inflector" HOT 1
- Issue with new rails app -> .env.erb file HOT 5
- alias_attribute broken in Rails 7.1.4 HOT 7
- Rate limiting does not work for API app , `cache_store` method is missing for ActionController::API HOT 1
- Second-db schema is overwritten erroneously when running db:migrate HOT 3
- [Authentication generator]: Don't set session_id in the cookies on every request
- Server doesn't load when using devcontainers (by `--devcontainer` flag in app generation) HOT 2
- bug: Guides highlight illegible text on highlight HOT 1
- Documentation / tutorials need a caveat that BootStrap doesn't mix with inline ES modules
- Rails 7.1 changing behaviour of rename_table in existing migrations HOT 8
- `ActiveRecord::ConnectionAdapters::SchemaStatements#add_index` does not document new option `nulls_not_distinct` HOT 3
- Rails Guides redesign overlapping on wide display.
- reject_if callback evaluation point changed in rails 7.2 HOT 2
- Calling connection.active? after establish_connection returns false since AR 7.2.0 HOT 5
- `destroyed_by_association` is not being set on belongs_to association HOT 2
- [Bug] [ActiveSupport] "rails destroy model Adress" [sic] does not check first if the model exists
- TRUSTED_PROXIES behavior inconsistency due to IPv4-mapped address handling change in Ruby 3.1+ HOT 2
- [ActiveRecord::Encryption] Allow deterministic encryption keys to be rotated HOT 1
- [ActiveRecord::Encryption] Is it possible to store the data in a JSONB column? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rails.