Skip to content

fix(ci/fetch): raise MySQL buffer pool size for fetch-ubuntu - #373

Merged
shino merged 2 commits into
masterfrom
shino/ci-ubuntu-mysql-buffer-pool
Oct 7, 2026
Merged

shino merged 2 commits into
masterfrom
shino/ci-ubuntu-mysql-buffer-pool

Conversation

@shino

@shino shino commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

What did you implement:

In the Fetch workflow, raise MySQL's innodb_buffer_pool_size from the default 128MB to 256MB before the mysql step of fetch-ubuntu.

That step has been failing on master and on every pull request (it was noted as a known failure in #372):

Failed to insert. dbpath: root:password@tcp(127.0.0.1:3306)/test?parseTime=true, err: Failed to insert Ubuntu CVE data. err: Failed to insert. err: Error 1206 (HY000): The total number of locks exceeds the lock table size

gost deletes and re-inserts all Ubuntu CVEs in a single transaction. InnoDB takes the lock memory for that transaction from the buffer pool, and the Ubuntu data has grown past what the default 128MB pool can hold:

Fetch run Ubuntu CVEs mysql step
2026-08-16 (master) 74,707 passed
2026-09-18 (master) 79,073 failed after 74,498
2026-09-22 (master) 79,868 failed after 74,548
2026-10-01 (#372) 81,210 failed after 74,869

The sqlite3, postgres and redis steps pass with the same data.

128MB is MySQL's stock default rather than a size anyone would run a production server with, so this only adjusts the CI service container and leaves gost itself unchanged. The official mysql image has no environment variable for server options and a services container cannot be given command arguments, so the size is set with SET GLOBAL through docker exec (the buffer pool can be resized online).

Only fetch-ubuntu is changed. The other fetch jobs pass with the default buffer pool.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Locally, against the mysql image started with its defaults (128MB buffer pool):

  • ran SET GLOBAL innodb_buffer_pool_size = 268435456 through docker exec, confirmed the pool was resized to 256MB (the workflow writes the same value as 256 * 1024 * 1024; confirmed that the expression is accepted and yields 268435456)
  • ./gost fetch --dbtype mysql ... ubuntu then completed: 81,210 CVEs inserted, exit code 0
  • while it ran, information_schema.innodb_trx.trx_lock_memory_bytes grew linearly with the inserted rows and peaked at about 120MB (about 55 million rows modified in the transaction)

actionlint .github/workflows/*.yml passes.

Checklist:

You don't have to satisfy all of the following.

  • Write tests
  • Write documentation
  • Check that there aren't other open pull requests for the same issue/feature
  • Format your source code by make fmt
  • Pass the test by make test
  • Provide verification config / commands
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES

The mysql step of fetch-ubuntu fails with "Error 1206 (HY000): The total number of locks exceeds the lock table size". gost inserts all Ubuntu CVEs in one transaction, and the lock memory that transaction needs no longer fits in MySQL's default 128MB buffer pool now that the data has grown past ~75k CVEs.

Double innodb_buffer_pool_size to 256MB on the service container before fetching. Only fetch-ubuntu is changed; the other fetch jobs pass with the default.
Copilot AI balanced review requested due to automatic review settings October 2, 2026 03:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

Review effort: Lite
Findings: 1 Medium severity · 1 Low severity

Open (2)
What changed in this PR

Adjusts the Fetch CI workflow to prevent the MySQL “lock table size exceeded (Error 1206)” failure when importing Ubuntu CVEs by increasing InnoDB buffer pool memory for the fetch-ubuntu job.

Changes:

  • Adds a pre-step in the MySQL fetch to resize innodb_buffer_pool_size to 256MB via docker exec.
  • Converts the MySQL fetch command into a multi-line script with an explanatory comment.
File Description
.github/​workflows/​fetch.yml Resizes MySQL InnoDB buffer pool in CI before running gost fetch for Ubuntu data.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/fetch.yml Outdated
Comment thread .github/workflows/fetch.yml Outdated
@shino
shino requested a balanced review from Copilot October 2, 2026 03:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

Review effort: Lite
Findings: 2 Medium severity · 3 Low severity

Open (5)

Comment thread .github/workflows/fetch.yml
Comment thread .github/workflows/fetch.yml Outdated
Comment thread .github/workflows/fetch.yml Outdated
268435456 is hard to read. SET GLOBAL does not accept a size suffix such
as 256M (ERROR 1232), but it does accept an arithmetic expression.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@shino
shino requested a balanced review from Copilot October 2, 2026 04:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread .github/workflows/fetch.yml
Comment thread .github/workflows/fetch.yml

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shino
shino requested a review from MaineK00n October 2, 2026 08:35
@shino
shino merged commit c7d1c5d into master Oct 7, 2026
9 checks passed
@shino
shino deleted the shino/ci-ubuntu-mysql-buffer-pool branch October 7, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants