Repository navigation
bottomless-cli: ls -v finds zstd snapshots (HeadObject); restore into sqld's namespace directory - #2342
Open
jrparks wants to merge 7 commits into
Open
bottomless-cli: ls -v finds zstd snapshots (HeadObject); restore into sqld's namespace directory#2342jrparks wants to merge 7 commits into
jrparks wants to merge 7 commits into
Conversation
ubuntu-latest moved to Ubuntu 26.04 between 2026-11-08 and 2026-11-11. On 26.04 these jobs fail before reaching any test: CMake 4 rejects wabt-sys 0.6.1 (cmake_minimum_required < 3.5) and the sqlite3_capi bindings come out empty. The same jobs pass on 24.04, which every green run so far used. Pinning restores CI for open PRs until the toolchain issues are fixed properly. Refs tursodatabase#2315
Go 1.27.4 refuses to link libsql_experimental.a: "disallowed LTO section ".llvmbc" in #cgo LDFLAGS". setup-go '>=1.21' picked 1.27.4 on the first run of this PR; the last green run used 1.27.3. Pin until the static library is built without embedded bitcode. Refs tursodatabase#2315
print_snapshot_summary looked only for db.gz, but the snapshot is db.<compression>: zstd by default (also gz, raw), so zstd snapshots were never found. It also used GetObjectAttributes, which S3-compatible stores such as OCI Object Storage do not implement (generic 'service error'). Probe db.zstd, db.gz, db.raw (restore's order) with HeadObject, which every S3 implementation supports, and print which one was found.
sqld's bottomless id is ns-<db id>:<namespace> (ns-:default with no db id) and the namespace database is <db path>/dbs/<namespace>/data. The CLI took everything after ns- as the directory name, so '-n ns-:default -d my.db' restored to my.db/dbs/:default/data, which sqld never reads. Use the part after the last ':' (older ns-<namespace> ids still work). Tested against a local S3 (s3s-fs) with sqld bottomless uploads: restore of an older generation lands in my.db/dbs/default/data, holds only that generation's rows, and sqld started with bottomless on it keeps them.
Author
|
The only failing check is |
This branch has not been deployed
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.
Two small fixes to
bottomless-cli, one commit each.ls -v(first commit).print_snapshot_summarylooked only fordb.gz, but the snapshot isdb.<compression>: zstd by default (also gz, raw), so zstd snapshots were reported as missing. It also calledGetObjectAttributes, which several S3-compatible stores (for example OCI Object Storage) do not implement; they answer with a generic service error. It now probesdb.zstd,db.gz,db.raw(the order restore uses) withHeadObject, which every S3 implementation supports, and prints which one it found.Restore path (second commit). sqld's bottomless id is
ns-<db id>:<namespace>(ns-:defaultwith no db id) and the namespace database is<db path>/dbs/<namespace>/data. The CLI used everything afterns-as the directory name, so-n ns-:default -d my.dbrestored tomy.db/dbs/:default/data, which sqld never reads. It now uses the part after the last:; the olderns-<namespace>form keeps working.Tested against a local S3 (s3s-fs) with sqld bottomless uploads: restoring an older generation lands in
my.db/dbs/default/data, holds only that generation's rows, and sqld started with bottomless on it keeps them.The branch sits on top of the two CI commits from #2317 (ubuntu-24.04 pin) so the Extensions and Go checks can run; those commits drop out once #2317 merges.
cargo check -p bottomless-clipasses.