From a503a9e0de27828ee014ec7821b5204f6263859b Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Fri, 10 Dec 2021 16:11:36 +0100 Subject: [PATCH] 11-to-12: Use a patched version of go-ds-badger with 2m GC interval --- fs-repo-11-to-12/go.mod | 1 + fs-repo-11-to-12/go.sum | 3 +++ .../vendor/github.com/ipfs/go-ds-badger/datastore.go | 2 +- fs-repo-11-to-12/vendor/modules.txt | 3 ++- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fs-repo-11-to-12/go.mod b/fs-repo-11-to-12/go.mod index 2d6d1d85..7cab69cf 100644 --- a/fs-repo-11-to-12/go.mod +++ b/fs-repo-11-to-12/go.mod @@ -7,6 +7,7 @@ require ( github.com/ipfs/fs-repo-migrations v1.7.1 github.com/ipfs/go-cid v0.0.7 github.com/ipfs/go-datastore v0.4.5 + github.com/ipfs/go-ds-badger v0.2.7-0.20211210151007-a2805355dcf5 // indirect github.com/ipfs/go-filestore v1.0.0 github.com/ipfs/go-ipfs v0.8.0 github.com/ipfs/go-ipfs-blockstore v1.0.3 // indirect diff --git a/fs-repo-11-to-12/go.sum b/fs-repo-11-to-12/go.sum index 4b751c39..7ec92bda 100644 --- a/fs-repo-11-to-12/go.sum +++ b/fs-repo-11-to-12/go.sum @@ -296,6 +296,8 @@ github.com/ipfs/go-ds-badger v0.2.1/go.mod h1:Tx7l3aTph3FMFrRS838dcSJh+jjA7cX9Dr github.com/ipfs/go-ds-badger v0.2.3/go.mod h1:pEYw0rgg3FIrywKKnL+Snr+w/LjJZVMTBRn4FS6UHUk= github.com/ipfs/go-ds-badger v0.2.6 h1:Hy8jw4rifxtRDrqpvC1yh36oIyE37KDzsUzlHUPOFiU= github.com/ipfs/go-ds-badger v0.2.6/go.mod h1:02rnztVKA4aZwDuaRPTf8mpqcKmXP7mLl6JPxd14JHA= +github.com/ipfs/go-ds-badger v0.2.7-0.20211210151007-a2805355dcf5 h1:ovdpQk2ZVK6eQLzMCZy1z2tJae7yvE8xaPUw4Pr1RqI= +github.com/ipfs/go-ds-badger v0.2.7-0.20211210151007-a2805355dcf5/go.mod h1:02rnztVKA4aZwDuaRPTf8mpqcKmXP7mLl6JPxd14JHA= github.com/ipfs/go-ds-flatfs v0.4.5 h1:4QceuKEbH+HVZ2ZommstJMi3o3II+dWS3IhLaD7IGHs= github.com/ipfs/go-ds-flatfs v0.4.5/go.mod h1:e4TesLyZoA8k1gV/yCuBTnt2PJtypn4XUlB5n8KQMZY= github.com/ipfs/go-ds-leveldb v0.0.1/go.mod h1:feO8V3kubwsEF22n0YRQCffeb79OOYIykR4L04tMOYc= @@ -885,6 +887,7 @@ github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTm github.com/otiai10/copy v1.5.1 h1:a/cs2E1/1V0az8K5nblbl+ymEa4E11AfaOLMar8V34w= github.com/otiai10/copy v1.5.1/go.mod h1:XWfuS3CrI0R6IE0FbgHsEazaXO8G0LpMp9o8tos0x4E= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= +github.com/otiai10/curr v1.0.0 h1:TJIWdbX0B+kpNagQrjgq8bCMrbhiuX73M2XwgtDMoOI= github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= github.com/otiai10/mint v1.3.2 h1:VYWnrP5fXmz1MXvjuUvcBrXSjGE6xjON+axB/UrpO3E= diff --git a/fs-repo-11-to-12/vendor/github.com/ipfs/go-ds-badger/datastore.go b/fs-repo-11-to-12/vendor/github.com/ipfs/go-ds-badger/datastore.go index b2c2e7fa..34780b4f 100644 --- a/fs-repo-11-to-12/vendor/github.com/ipfs/go-ds-badger/datastore.go +++ b/fs-repo-11-to-12/vendor/github.com/ipfs/go-ds-badger/datastore.go @@ -88,7 +88,7 @@ var DefaultOptions Options func init() { DefaultOptions = Options{ GcDiscardRatio: 0.2, - GcInterval: 15 * time.Minute, + GcInterval: 2 * time.Minute, GcSleep: 10 * time.Second, Options: badger.LSMOnlyOptions(""), } diff --git a/fs-repo-11-to-12/vendor/modules.txt b/fs-repo-11-to-12/vendor/modules.txt index 1a3f7a29..ddbf46dc 100644 --- a/fs-repo-11-to-12/vendor/modules.txt +++ b/fs-repo-11-to-12/vendor/modules.txt @@ -123,7 +123,8 @@ github.com/ipfs/go-datastore/mount github.com/ipfs/go-datastore/namespace github.com/ipfs/go-datastore/query github.com/ipfs/go-datastore/sync -# github.com/ipfs/go-ds-badger v0.2.6 +# github.com/ipfs/go-ds-badger v0.2.7-0.20211210151007-a2805355dcf5 +## explicit github.com/ipfs/go-ds-badger # github.com/ipfs/go-ds-flatfs v0.4.5 github.com/ipfs/go-ds-flatfs