Skip to content
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

Default to synchronous FULL for the sqlite backend #11387

Merged
merged 3 commits into from
Apr 1, 2022

Conversation

espadolini
Copy link
Contributor

@espadolini espadolini commented Mar 23, 2022

This PR changes the default synchronous pragma to FULL rather than OFF. This helps prevent database corruption in case of system crashes or power loss.

The performance impact should only be noticeable in clusters so big that they should've been switched to etcd/dynamodb already, and the option is configurable in the auth_service.storage section of the auth configuration file, so it can be turned back to OFF there if needed.

Closes #11119.

@espadolini espadolini added the robustness Resistance to crashes and reliability label Mar 23, 2022
@espadolini espadolini changed the title Default to synchronous FULL for sqlite Default to synchronous FULL for the sqlite backend Mar 23, 2022
Helps with robustness, and clusters so big that the auth backend
performance will be affected by this change are also so big that they
should've probably been using etcd/dynamo already anyway.
@espadolini espadolini force-pushed the espadolini/sensible-sqlite-fsync branch from a076fb1 to 92594db Compare March 30, 2022 15:07
@espadolini espadolini marked this pull request as ready for review March 30, 2022 15:07
@github-actions github-actions bot requested review from r0mant and Tener March 30, 2022 15:08
@espadolini espadolini enabled auto-merge (squash) March 31, 2022 20:50
@espadolini espadolini merged commit cae1d32 into master Apr 1, 2022
@espadolini espadolini deleted the espadolini/sensible-sqlite-fsync branch April 1, 2022 07:15
espadolini added a commit that referenced this pull request Apr 1, 2022
* Always use in-memory caches (#11386)

* Always use in-memory caches

This also cleans up now-useless fields and constants related to on-disk
caches.

* Remove the cache tombstone mechanism

As we're never reopening the same cache backend twice, this is no longer
useful.

* Warn if a cache directory exists on disk

We can't remove it automatically because we might be in the middle of an
upgrade with a old version of Teleport still running.

* Default to synchronous FULL for sqlite (#11387)
espadolini added a commit that referenced this pull request Apr 1, 2022
* Always use in-memory caches (#11386)

* Always use in-memory caches

This also cleans up now-useless fields and constants related to on-disk
caches.

* Remove the cache tombstone mechanism

As we're never reopening the same cache backend twice, this is no longer
useful.

* Warn if a cache directory exists on disk

We can't remove it automatically because we might be in the middle of an
upgrade with a old version of Teleport still running.

* Default to synchronous FULL for sqlite (#11387)
espadolini added a commit that referenced this pull request Apr 1, 2022
* Always use in-memory caches (#11386)

* Always use in-memory caches

This also cleans up now-useless fields and constants related to on-disk
caches.

* Remove the cache tombstone mechanism

As we're never reopening the same cache backend twice, this is no longer
useful.

* Warn if a cache directory exists on disk

We can't remove it automatically because we might be in the middle of an
upgrade with a old version of Teleport still running.

* Default to synchronous FULL for sqlite (#11387)
@webvictim webvictim mentioned this pull request Apr 19, 2022
@webvictim webvictim mentioned this pull request Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
robustness Resistance to crashes and reliability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The default synchronous setting for sqlite auth backends should be something other than OFF
3 participants