-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add setting to control the maximum swap space #10978
Merged
Merged
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
2130e4d
moved from 'temporary_file_manager' branch
Tishj d20a0f7
Merge branch 'temporary_file_manager' into maximum_swap_space
Tishj 9d5d254
Merge branch 'temporary_file_manager' into maximum_swap_space
Tishj 1e441a6
create the exception, thrown whenever we try to increase the temp dir…
Tishj b7d9997
increase to 5x memory limit
Tishj 3d10568
collect information about the disk when possible
Tishj a0d98f4
further thinking
Tishj 8c8ffe6
test that explicitly set values are not overridden when we create the…
Tishj d3ecab6
add initial tests
Tishj a97bcb7
more tests with different max swap sizes
Tishj 0227e2d
fix up comment
Tishj d56137a
check if the config was set explicitly or not in DatabaseInstance::Co…
Tishj b37d193
avoid modifying the passed in DBConfig
Tishj 1491dd7
fix up some behavior
Tishj 8b2b5cd
make the in-memory database detection better
Tishj 96fc46e
initialize temp_directory to '.tmp' for every version of in-memory co…
Tishj 8ad8353
use 90% of the available disk space by default
Tishj 63e37c9
Merge remote-tracking branch 'upstream/main' into maximum_swap_space
Tishj 29678c5
RESET temp_directory should use the same behavior as DatabaseInstance…
Tishj 9e5d10f
add missing PRAGMA statement, because of a bug the temp directory was…
Tishj dfc5e70
the tight constraints we set are broken when --force-storage is used,…
Tishj 0eee4f2
Merge remote-tracking branch 'upstream/main' into maximum_swap_space
Tishj 95df992
Merge remote-tracking branch 'upstream/main' into maximum_swap_space
Tishj 4848acf
move the setting into the buffer manager + temporary directory handle
Tishj 1708612
get rid of FileSizeMonitor, just pass along the TemporaryFileManager &
Tishj 03fc90e
remove named connection, should be stripped when it gets into the dat…
Tishj eebc24c
test error when setting a limit that's too low
Tishj 5774dc6
delay the available disk space lookup until we have made sure the dir…
Tishj fb8315c
Merge remote-tracking branch 'upstream/main' into maximum_swap_space
Tishj b82b9c1
Merge remote-tracking branch 'upstream/main' into maximum_swap_space
Tishj affb50b
fix merge conflicts
Tishj 80f6b7d
Merge remote-tracking branch 'upstream/main' into maximum_swap_space
Tishj 815c155
remove dead code, fix tidy issue
Tishj a8de19b
Merge remote-tracking branch 'upstream/main' into maximum_swap_space
Tishj df40291
use INVALID_INDEX-1 to indicate unlimited swap space
Tishj 180e4a2
Merge remote-tracking branch 'upstream/main' into maximum_swap_space
Tishj 6b8c631
test setting the maximum swap space to unlimited
Tishj da941a5
Merge remote-tracking branch 'upstream/main' into maximum_swap_space
Tishj 5e4938b
create an assertion out of this, TemporaryDirectoryHandle should neve…
Tishj c93ab90
handle failing GetAvailableDiskSpace
Tishj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
create the exception, thrown whenever we try to increase the temp dir…
…ectory size beyond the max
- Loading branch information
commit 1e441a68212c9fcefce95d2b63d8622e6e9985a5
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to be able to adjust this at run-time while the temporary directory is in use? Currently this implementation allows for it - but similarly to the temp directory setting we could also say that this has to be specified prior to creating the temp directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to allow this, then we need to read from
config.options.maximum_swap_space
here at every iteration to make sure it has not changed in the meantime.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And also, if we want to allow for this, what do we do if the setting is lowered while the limit is already exceeded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add this as a test using e.g. a temporary table with a low memory limit.