Highly variable duration of truncations (not a database_cleaner issue)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 10/100
Direzione di ricerca
L’issue non indica file del repository, test o entry point. Inizia riproducendo la variazione dei tempi segnalata per MySQL TRUNCATE in relazione a DatabaseCleaner.clean_with(:truncation) e determina se il comportamento appartiene a questo progetto. Il lavoro sarà completo solo con una spiegazione confermata da un maintainer oppure con un ambito concreto e accettato per una modifica.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I'm sorry to ask my question here, but as I can't find an explanation elsewhere, I'm asking you because I figure you must have a good grasp of the subject.
When I use a DatabaseCleaner.clean_with(:truncation) before launching my rails tests, I get very variable execution times for each drop table query, even though my tables are almost empty.
This varies from 30 to 400 ms, and the slow / fast requests follow each other, so it's as if the MySQL Server is going faster or slower. Do you have an explanation and a way of solving this problem?
$ tail -f log/test.log
D, [2023-10-12T09:17:39.404980 #25359] DEBUG -- : (45.5ms) TRUNCATE TABLE `table1`
D, [2023-10-12T09:17:39.438557 #25359] DEBUG -- : (33.4ms) TRUNCATE TABLE `table2`
D, [2023-10-12T09:17:39.473029 #25359] DEBUG -- : (34.3ms) TRUNCATE TABLE `table3`
D, [2023-10-12T09:17:39.514899 #25359] DEBUG -- : (41.7ms) TRUNCATE TABLE `table4`
D, [2023-10-12T09:17:39.631417 #25359] DEBUG -- : (116.3ms) TRUNCATE TABLE `table5`
D, [2023-10-12T09:17:39.685199 #25359] DEBUG -- : (53.3ms) TRUNCATE TABLE `table6`
D, [2023-10-12T09:17:39.738879 #25359] DEBUG -- : (53.2ms) TRUNCATE TABLE `table7`
D, [2023-10-12T09:17:39.809097 #25359] DEBUG -- : (69.7ms) TRUNCATE TABLE `table8`
D, [2023-10-12T09:17:39.889177 #25359] DEBUG -- : (79.6ms) TRUNCATE TABLE `table9`
D, [2023-10-12T09:17:39.933648 #25359] DEBUG -- : (44.0ms) TRUNCATE TABLE `table10`
D, [2023-10-12T09:17:39.992856 #25359] DEBUG -- : (58.7ms) TRUNCATE TABLE `table11`
D, [2023-10-12T09:17:40.299925 #25359] DEBUG -- : (306.6ms) TRUNCATE TABLE `table12`
D, [2023-10-12T09:17:40.454695 #25359] DEBUG -- : (154.4ms) TRUNCATE TABLE `table13`
D, [2023-10-12T09:17:40.590997 #25359] DEBUG -- : (136.0ms) TRUNCATE TABLE `table14`
D, [2023-10-12T09:17:40.718787 #25359] DEBUG -- : (127.3ms) TRUNCATE TABLE `table15`
D, [2023-10-12T09:17:40.925396 #25359] DEBUG -- : (206.1ms) TRUNCATE TABLE `table16`
D, [2023-10-12T09:17:41.103438 #25359] DEBUG -- : (177.6ms) TRUNCATE TABLE `table17`
D, [2023-10-12T09:17:41.305653 #25359] DEBUG -- : (201.8ms) TRUNCATE TABLE `table18`
D, [2023-10-12T09:17:41.509797 #25359] DEBUG -- : (203.7ms) TRUNCATE TABLE `table19`
D, [2023-10-12T09:17:41.756406 #25359] DEBUG -- : (246.1ms) TRUNCATE TABLE `table20`
D, [2023-10-12T09:17:42.136319 #25359] DEBUG -- : (379.4ms) TRUNCATE TABLE `table21`
D, [2023-10-12T09:17:42.322232 #25359] DEBUG -- : (185.4ms) TRUNCATE TABLE `table22`
Thank you for your time !
- Lingua principale
- Ruby
- Stelle
- 3k
- Fork
- 485
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DatabaseCleaner/database_cleaner
-
:transaction strategy: uncommitted data disappears after perform_enqueued_jobs on Rails ≥ 7.2 Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 67/100
-
Cleaning of dev DB Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
-
Cannot truncate a table referenced in a foreign key constraint (ActiveRecord::StatementInvalid) Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
DatabaseCleaner/database_cleaner#717 · 5 commenti · 1 reazione ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
DatabaseCleaner/database_cleaner#716 · 2 commenti ·
Tutte le issue di DatabaseCleaner/database_cleaner
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Please Drop ruby 3.2 support Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
googleapis/google-api-ruby-client#28001 · 5 reazioni ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100