-
Notifications
You must be signed in to change notification settings - Fork 50
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
WIP content-sqlite: preallocate space to avoid outside diskfull events #6217
Open
chu11
wants to merge
11
commits into
flux-framework:master
Choose a base branch
from
chu11:issue6169_sqlite_preallocate
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
bc19543
test: add 5m tmpfs
chu11 d6ce14b
content-sqlite: split truncate out of function
chu11 1f95a3d
content-sqlite: initialize variables on close db
chu11 ffa16c3
content-sqlite: open db given input parameters
chu11 cdbea4b
content-sqlite: support preallocate config
chu11 f366ae4
t: cover content-sqlite preallocate
chu11 a0e7c60
content-sqlite: disable journaling if hit ENOSPC
chu11 82eb65e
t: cover preallocate with journaling
chu11 816fae5
doc: document new content-sqlite config
chu11 297057f
fixup! content-sqlite: support preallocate config
chu11 059d388
test
chu11 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
============================= | ||
flux-config-content-sqlite(5) | ||
============================= | ||
|
||
|
||
DESCRIPTION | ||
=========== | ||
|
||
The Flux system may configure one of several possible content backends for | ||
storing data to long term disk. The ``content-sqlite`` module is one | ||
such backend, using ``sqlite`` for storage. | ||
|
||
The ``content-sqlite`` table may contain the following keys: | ||
|
||
|
||
KEYS | ||
==== | ||
|
||
journal_mode | ||
(optional) Configure the sqlite journal mode. By default is set to ``WAL`` | ||
if a flux statedir is configured, otherwise defaults to ``OFF``. Legal options | ||
are ``DELETE``, ``TRUNCATE``, ``PERSIST``, ``MEMORY``, ``WAL``, and ``OFF``. | ||
|
||
synchronous | ||
(optional) Configure the sqlite synchronous mode. By default is set to ``NORMAL`` | ||
if a flux statedir is configured, otherwise defaults to ``OFF``. Legal options | ||
are ``EXTRA``, ``FULL``, ``NORMAL``, ``OFF``. | ||
|
||
preallocate | ||
(optional) Specify a number of bytes to preallocate to the sqlite database. This | ||
can ensure the module can continue to function even if the disk has been full | ||
due to other operations on the node (e.g. system logging has filled up disk). Using | ||
preallocated space requires journaling to be disabled, which will automatically be | ||
done if the disk is out of space and the preallocate setting is configured. | ||
|
||
|
||
EXAMPLES | ||
======== | ||
|
||
:: | ||
|
||
[content-sqlite] | ||
journal_mode = "WAL" | ||
synchronous = "NORMAL" | ||
preallocate = 10737418240 | ||
|
||
|
||
SEE ALSO | ||
======== | ||
|
||
:man5:`flux-config`, | ||
`sqlite <https://www.sqlite.org/>`_, | ||
`sqlite pragmas <https://www.sqlite.org/pragma.html>`_ | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -919,3 +919,10 @@ DEEPBIND | |
PRELOAD | ||
RTLD | ||
dlopened | ||
WAL | ||
backend | ||
backends | ||
journaling | ||
pragmas | ||
preallocate | ||
preallocated |
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.
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.
Might want to put those URLs in a RESOURCES section like most of the other section 5 man pages.
The URLs are spelled out so you can cut and paste them from the man command output.
For example, in flux-config(5):