• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

skeema / skeema / 13447353665
93%
main: 92%

Build:
Build:
LAST BUILD BRANCH: remove-sqlx-callsites
DEFAULT BRANCH: main
Ran 21 Feb 2025 12:32AM UTC
Jobs 1
Files 78
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Feb 2025 12:27AM UTC coverage: 93.285% (+0.01%) from 93.274%
13447353665

push

github

evanelias
workspaces: for table cleanup, replace concurrency with chunking

MariaDB's foreign key locking behavior during DDL changed in their May 2024
server releases for MariaDB 10.6 and up. As a result of that change, if tables
with circular foreign key relationships are dropped concurrently, the DROP
TABLE statements can enter an infinite loop due to server bug MDEV-36129. To
prevent Skeema from ever triggering this situation, this commit removes
concurrent table dropping during workspace cleanup, for all flavors. Instead,
we now drop tables using a single thread, but potentially dropping several
tables per statement, depending on the server flavor and temp-schema-threads
option.

Background on Skeema workspace cleanup behavior:

To interpret the CREATE statements in *.sql files, Skeema runs the statements
in a temporary location, called a workspace. When cleaning up a workspace, we
drop tables separately *before* dropping the entire workspace database,
because DROP DATABASE with many tables present (even if all empty) can hold
server locks/mutexes for a disruptively long time period.

Skeema used concurrency in these DROP TABLEs, controlled by the
temp-schema-threads option when using the default workspace=temp-schema. Even
though these DROP TABLEs likely get serialized behind global locks behind the
scenes, queueing up concurrent DROPs still helped cleanup performance on slow
networks, as this avoids full network round-trip between each DROP. However,
this concurrent logic has already needed numerous tweaks over the years:

* In older MySQL releases and in MariaDB, dropping a table causes a buffer
  pool scan, even if the table is empty. With larger buffer pools, this harms
  DROP TABLE performance, so Skeema disabled concurrent cleanup if the buffer
  pool was 32 GB or larger.

* In MySQL 8, foreign key metadata locking was changed such that it extends
  MDLs from child tables to parent tables. When dropping tables concurrently,
  this could result in so... (continued)

62 of 68 new or added lines in 5 files covered. (91.18%)

10266 of 11005 relevant lines covered (93.28%)

1.11 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
6
89.52
-0.05% internal/tengo/instance.go
Jobs
ID Job ID Ran Files Coverage
1 13447353665.1 21 Feb 2025 12:32AM UTC 78
93.28
GitHub Action Run
Source Files on build 13447353665
  • Tree
  • List 78
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 0617f91d on github
  • Prev Build on timeout-tweaks (#13401177667)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc