Conversation
buf_pool_t::garbage_collect(): Correctly handle the SHRINK_ABORT return value of buf_pool_t::shrink().
|
|
dr-m
commented
Sep 30, 2026
Comment on lines
-1068
to
+1073
| if (shrink(size)) | ||
| { | ||
| switch (shrink(size)) { | ||
| case SHRINK_IN_PROGRESS: | ||
| continue; | ||
| case SHRINK_ABORT: | ||
| goto aborted; | ||
| case SHRINK_DONE: |
Contributor
Author
There was a problem hiding this comment.
If the goto aborted is removed, the test innodb.innodb_buffer_pool_resize_temporary will trigger a debug assertion failure:
Version: '10.11.19-MariaDB-debug-log' socket: '/dev/shm/10/mysql-test/var/tmp/mysqld.1.sock' port: 19000 Source distribution
2026-09-30 11:42:38 4 [Note] InnoDB: Resizing hash tables
2026-09-30 11:42:38 4 [Note] InnoDB: innodb_buffer_pool_size=24m (1515 pages) resized from 8m (505 pages)
2026-09-30 11:42:38 0 [Note] InnoDB: Memory pressure event shrunk innodb_buffer_pool_size=16m (1010 pages) from 24m (1515 pages)
2026-09-30 11:42:38 4 [Note] InnoDB: Memory pressure event shrunk innodb_buffer_pool_size=8m (505 pages) from 16m (1010 pages)
mariadbd: …/storage/innobase/buf/buf0buf.cc:4209: void buf_pool_t::validate(): Assertion `(free).count <= n_free' failed.
grooverdan
approved these changes
Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
buf_pool_t::garbage_collect(): Correctly handle theSHRINK_ABORTreturn value ofbuf_pool_t::shrink().This fixes a regression that was introduced in ba81009 of #3826.