snapshot: sqlite: use a subdirectory for consistency with LMDB #932
No reviewers
Labels
No labels
action
check-aws
action
discussion-needed
action
for-external-contributors
action
for-newcomers
action
more-info-needed
action
need-funding
action
triage-required
kind
correctness
kind
ideas
kind
improvement
kind
performance
kind
testing
kind
usability
kind
wrong-behavior
prio
critical
prio
low
scope
admin-api
scope
background-healing
scope
build
scope
documentation
scope
k8s
scope
layout
scope
metadata
scope
ops
scope
rpc
scope
s3-api
scope
security
scope
telemetry
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Deuxfleurs/garage#932
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "baptiste/garage:snapshot_consistency_sqlite"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently, taking a snapshot of the metadata database with sqlite creates
a sqlite file without extension with the following format:
This makes it hard to understand what kind of data this is, and is not
consistent with LMDB:
With this change, we now get a directory with a single db.sqlite file:
@baptiste Could you rebase this PR on the current main to allow the updated CI to go through? Thanks, and sorry for the inconvenience.
70db03373b
to17b76a7ee0
Just a small change, otherwise LGTM
@ -146,1 +146,4 @@
}
std::fs::create_dir_all(to)?;
let mut path = to.clone();
path.push("data.sqlite");
I think we should call this file
db.sqlite
, which is the same name as the sqlite database file in the metadata directory. This makes it clear which file to replace when trying to restore a snapshot.Good catch, thanks, updated!
17b76a7ee0
to43402c9619