1
0
Fork 0
mirror of https://github.com/imjasonh/terraform-playground synced 2026-07-08 07:44:57 +00:00

litestream: upgrade to v0.5.11 for on-demand VFS reads

Bump github.com/benbjohnson/litestream from v0.5.7 to v0.5.11 and Go 1.25.
The app already uses the Litestream VFS on GCE instead of a full restore
on startup; the newer release improves page-level fetch and write sync.

Co-authored-by: Jason Hall <imjasonh@users.noreply.github.com>
This commit is contained in:
Cursor Agent 2026-05-30 00:20:01 +00:00
parent 42fd405534
commit 4f78a65ce8
No known key found for this signature in database
3 changed files with 10 additions and 5 deletions

View file

@ -1,10 +1,10 @@
module github.com/imjasonh/terraform-playground/litestream
go 1.24.1
go 1.25.0
require (
cloud.google.com/go/compute/metadata v0.3.0
github.com/benbjohnson/litestream v0.5.7
github.com/benbjohnson/litestream v0.5.11
github.com/chainguard-dev/clog v1.3.1
github.com/mattn/go-sqlite3 v1.14.33
github.com/psanford/sqlite3vfs v0.0.0-20251127171934-4e34e03a991a
@ -30,6 +30,7 @@ require (
github.com/hablullah/go-juliandays v1.0.0 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/jalaali/go-jalaali v0.0.0-20210801064154-80525e88d958 // indirect
github.com/lmittmann/tint v1.1.3 // indirect
github.com/magefile/mage v1.14.0 // indirect
github.com/markusmobius/go-dateparser v1.2.4 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect

View file

@ -62,8 +62,8 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.41.5 h1:SciGFVNZ4mHdm7gpD1dgZYnCuVdX
github.com/aws/aws-sdk-go-v2/service/sts v1.41.5/go.mod h1:iW40X4QBmUxdP+fZNOpfmkdMZqsovezbAeO+Ubiv2pk=
github.com/aws/smithy-go v1.24.0 h1:LpilSUItNPFr1eY85RYgTIg5eIEPtvFbskaFcmmIUnk=
github.com/aws/smithy-go v1.24.0/go.mod h1:LEj2LM3rBRQJxPZTB4KuzZkaZYnZPnvgIhb4pu07mx0=
github.com/benbjohnson/litestream v0.5.7 h1:34o4HM9wbNezRLpnbmn5UofZFEvpqedWikxV4OKb5oQ=
github.com/benbjohnson/litestream v0.5.7/go.mod h1:i7C4gIB/sgr3dqG0ZLIqg7LBwwM9rLa28cO4wZENhI8=
github.com/benbjohnson/litestream v0.5.11 h1:znCjw6UmY26zTtezE0yaZxrrQYFKsQVK/iX/SUzvtB8=
github.com/benbjohnson/litestream v0.5.11/go.mod h1:+VmnRIpWs6+ijN+zGECh6iPun0ojNFPKwGJBCNpchWw=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
@ -157,6 +157,8 @@ github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/lmittmann/tint v1.1.3 h1:Hv4EaHWXQr+GTFnOU4VKf8UvAtZgn0VuKT+G0wFlO3I=
github.com/lmittmann/tint v1.1.3/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE=
github.com/magefile/mage v1.14.0 h1:6QDX3g6z1YvJ4olPhT1wksUcSa/V0a1B+pJb73fBjyo=
github.com/magefile/mage v1.14.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
github.com/markusmobius/go-dateparser v1.2.4 h1:2e8XJozaERVxGwsRg72coi51L2aiYqE2gukkdLc85ck=

View file

@ -43,8 +43,10 @@ func main() {
clog.Fatalf("failed to init replica client: %v", err)
}
vfs := litestream.NewVFS(client, &log.Logger)
vfs := litestream.NewVFS(client, log.Base())
vfs.PollInterval = 1 * time.Second
// Serve reads on-demand from the replica; do not hydrate the full DB locally.
vfs.HydrationEnabled = false
vfs.WriteEnabled = true
vfs.WriteSyncInterval = 1 * time.Second