From 635bb4de4e45ddaf4f221cdda309c377d3eac880 Mon Sep 17 00:00:00 2001 From: ucwong Date: Sun, 31 Dec 2023 02:32:41 +0800 Subject: [PATCH] fs task buff --- go.mod | 6 +++--- go.sum | 12 ++++++------ .../CortexFoundation/torrentfs/backend/doc.go | 2 +- vendor/github.com/urfave/cli/v2/app.go | 7 +++++-- vendor/github.com/urfave/cli/v2/godoc-current.txt | 4 ++-- vendor/github.com/urfave/cli/v2/help.go | 2 +- vendor/github.com/urfave/cli/v2/suggestions.go | 8 ++++++++ vendor/modules.txt | 6 +++--- 8 files changed, 29 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index 13687cc381..1930dbc459 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.1 github.com/CortexFoundation/inference v1.0.2-0.20230307032835-9197d586a4e8 github.com/CortexFoundation/statik v0.0.0-20210315012922-8bb8a7b5dc66 - github.com/CortexFoundation/torrentfs v1.0.57 + github.com/CortexFoundation/torrentfs v1.0.58-0.20231230153252-90d728965095 github.com/VictoriaMetrics/fastcache v1.12.2 github.com/arsham/figurine v1.3.0 github.com/aws/aws-sdk-go-v2 v1.24.0 @@ -59,7 +59,7 @@ require ( github.com/stretchr/testify v1.8.4 github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d github.com/ucwong/color v1.10.1-0.20200624105241-fba1e010fe1e - github.com/urfave/cli/v2 v2.27.0 + github.com/urfave/cli/v2 v2.27.1 go.uber.org/automaxprocs v1.5.3 golang.org/x/crypto v0.17.0 golang.org/x/exp v0.0.0-20231226003508-02704c960a9b @@ -158,7 +158,7 @@ require ( github.com/google/btree v1.1.2 // indirect github.com/google/flatbuffers v23.5.26+incompatible // indirect github.com/google/go-querystring v1.1.0 // indirect - github.com/google/pprof v0.0.0-20231229022155-5aaadb5f27d9 // indirect + github.com/google/pprof v0.0.0-20231229205709-960ae82b1e42 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-retryablehttp v0.7.5 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect diff --git a/go.sum b/go.sum index 9e043d8bb3..a87ba64b6d 100644 --- a/go.sum +++ b/go.sum @@ -68,8 +68,8 @@ github.com/CortexFoundation/statik v0.0.0-20210315012922-8bb8a7b5dc66/go.mod h1: github.com/CortexFoundation/torrentfs v1.0.13-0.20200623060705-ce027f43f2f8/go.mod h1:Ma+tGhPPvz4CEZHaqEJQMOEGOfHeQBiAoNd1zyc/w3Q= github.com/CortexFoundation/torrentfs v1.0.14-0.20200703071639-3fcabcabf274/go.mod h1:qnb3YlIJmuetVBtC6Lsejr0Xru+1DNmDCdTqnwy7lhk= github.com/CortexFoundation/torrentfs v1.0.20-0.20200810031954-d36d26f82fcc/go.mod h1:N5BsicP5ynjXIi/Npl/SRzlJ630n1PJV2sRj0Z0t2HA= -github.com/CortexFoundation/torrentfs v1.0.57 h1:sTTTU3N5g20jmtAAL5GFsRlSH7TwGp/4nfgjJaGRWGo= -github.com/CortexFoundation/torrentfs v1.0.57/go.mod h1:KOMNUjgmptFC7H8F2i0qEdWyMAm4gNaG2Ai24cBq7Vo= +github.com/CortexFoundation/torrentfs v1.0.58-0.20231230153252-90d728965095 h1:Ntktm7m9z4sOaWfBNrsP6KkMrPiztXcY42Uro9RfGUE= +github.com/CortexFoundation/torrentfs v1.0.58-0.20231230153252-90d728965095/go.mod h1:KOMNUjgmptFC7H8F2i0qEdWyMAm4gNaG2Ai24cBq7Vo= github.com/CortexFoundation/wormhole v0.0.2-0.20231221155549-5c938553b5fc h1:LkbBJvvbfraAg/joFxPZtDvmdrjuTqPfbGhdnrEq7GM= github.com/CortexFoundation/wormhole v0.0.2-0.20231221155549-5c938553b5fc/go.mod h1:ipzmPabDgzYKUbXkGVe2gTkBEp+MsDx6pXGiuYzmP6s= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= @@ -621,8 +621,8 @@ github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OI github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= -github.com/google/pprof v0.0.0-20231229022155-5aaadb5f27d9 h1:jmZrGBc6nAoZ1WUm6rDBnykKw8oXMmGCi1gc3nseeG4= -github.com/google/pprof v0.0.0-20231229022155-5aaadb5f27d9/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20231229205709-960ae82b1e42 h1:dHLYa5D8/Ta0aLR2XcPsrkpAgGeFs6thhMcQK0oQ0n8= +github.com/google/pprof v0.0.0-20231229205709-960ae82b1e42/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -1262,8 +1262,8 @@ github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijb github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli/v2 v2.1.1/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ= -github.com/urfave/cli/v2 v2.27.0 h1:uNs1K8JwTFL84X68j5Fjny6hfANh9nTlJ6dRtZAFAHY= -github.com/urfave/cli/v2 v2.27.0/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= +github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= +github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU= github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= diff --git a/vendor/github.com/CortexFoundation/torrentfs/backend/doc.go b/vendor/github.com/CortexFoundation/torrentfs/backend/doc.go index d116c58310..fe003a366a 100644 --- a/vendor/github.com/CortexFoundation/torrentfs/backend/doc.go +++ b/vendor/github.com/CortexFoundation/torrentfs/backend/doc.go @@ -24,7 +24,7 @@ import ( const ( bucket = params.Bucket //it is best size is 1/3 full nodes group = params.Group - taskChanBuffer = 1 //params.SyncBatch + taskChanBuffer = 4 //params.SyncBatch torrentChanSize = 8 block = int64(params.PER_UPLOAD_BYTES) diff --git a/vendor/github.com/urfave/cli/v2/app.go b/vendor/github.com/urfave/cli/v2/app.go index 741163a744..6e6f6d0d63 100644 --- a/vendor/github.com/urfave/cli/v2/app.go +++ b/vendor/github.com/urfave/cli/v2/app.go @@ -23,8 +23,8 @@ var ( fmt.Sprintf("See %s", appActionDeprecationURL), 2) ignoreFlagPrefix = "test." // this is to ignore test flags when adding flags from other packages - SuggestFlag SuggestFlagFunc = suggestFlag - SuggestCommand SuggestCommandFunc = suggestCommand + SuggestFlag SuggestFlagFunc = nil // initialized in suggestions.go unless built with urfave_cli_no_suggest + SuggestCommand SuggestCommandFunc = nil // initialized in suggestions.go unless built with urfave_cli_no_suggest SuggestDidYouMeanTemplate string = suggestDidYouMeanTemplate ) @@ -368,6 +368,9 @@ func (a *App) suggestFlagFromError(err error, command string) (string, error) { hideHelp = hideHelp || cmd.HideHelp } + if SuggestFlag == nil { + return "", err + } suggestion := SuggestFlag(flags, flag, hideHelp) if len(suggestion) == 0 { return "", err diff --git a/vendor/github.com/urfave/cli/v2/godoc-current.txt b/vendor/github.com/urfave/cli/v2/godoc-current.txt index e87b13a66c..4b620feeb0 100644 --- a/vendor/github.com/urfave/cli/v2/godoc-current.txt +++ b/vendor/github.com/urfave/cli/v2/godoc-current.txt @@ -27,8 +27,8 @@ application: VARIABLES var ( - SuggestFlag SuggestFlagFunc = suggestFlag - SuggestCommand SuggestCommandFunc = suggestCommand + SuggestFlag SuggestFlagFunc = nil // initialized in suggestions.go unless built with urfave_cli_no_suggest + SuggestCommand SuggestCommandFunc = nil // initialized in suggestions.go unless built with urfave_cli_no_suggest SuggestDidYouMeanTemplate string = suggestDidYouMeanTemplate ) var AppHelpTemplate = `NAME: diff --git a/vendor/github.com/urfave/cli/v2/help.go b/vendor/github.com/urfave/cli/v2/help.go index 84bd77bc17..640e290452 100644 --- a/vendor/github.com/urfave/cli/v2/help.go +++ b/vendor/github.com/urfave/cli/v2/help.go @@ -278,7 +278,7 @@ func ShowCommandHelp(ctx *Context, command string) error { if ctx.App.CommandNotFound == nil { errMsg := fmt.Sprintf("No help topic for '%v'", command) - if ctx.App.Suggest { + if ctx.App.Suggest && SuggestCommand != nil { if suggestion := SuggestCommand(ctx.Command.Subcommands, command); suggestion != "" { errMsg += ". " + suggestion } diff --git a/vendor/github.com/urfave/cli/v2/suggestions.go b/vendor/github.com/urfave/cli/v2/suggestions.go index c73a0012da..9d2b7a81e7 100644 --- a/vendor/github.com/urfave/cli/v2/suggestions.go +++ b/vendor/github.com/urfave/cli/v2/suggestions.go @@ -1,3 +1,6 @@ +//go:build !urfave_cli_no_suggest +// +build !urfave_cli_no_suggest + package cli import ( @@ -6,6 +9,11 @@ import ( "github.com/xrash/smetrics" ) +func init() { + SuggestFlag = suggestFlag + SuggestCommand = suggestCommand +} + func jaroWinkler(a, b string) float64 { // magic values are from https://github.com/xrash/smetrics/blob/039620a656736e6ad994090895784a7af15e0b80/jaro-winkler.go#L8 const ( diff --git a/vendor/modules.txt b/vendor/modules.txt index 46b213ceab..7cf6ddd08f 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -58,7 +58,7 @@ github.com/CortexFoundation/robot/backend # github.com/CortexFoundation/statik v0.0.0-20210315012922-8bb8a7b5dc66 ## explicit; go 1.16 github.com/CortexFoundation/statik -# github.com/CortexFoundation/torrentfs v1.0.57 +# github.com/CortexFoundation/torrentfs v1.0.58-0.20231230153252-90d728965095 ## explicit; go 1.21 github.com/CortexFoundation/torrentfs github.com/CortexFoundation/torrentfs/backend @@ -619,7 +619,7 @@ github.com/google/go-querystring/query ## explicit; go 1.12 github.com/google/gofuzz github.com/google/gofuzz/bytesource -# github.com/google/pprof v0.0.0-20231229022155-5aaadb5f27d9 +# github.com/google/pprof v0.0.0-20231229205709-960ae82b1e42 ## explicit; go 1.19 github.com/google/pprof/profile # github.com/google/uuid v1.5.0 @@ -1011,7 +1011,7 @@ github.com/ucwong/golang-kv/pebble # github.com/ucwong/shard v1.0.1-0.20231225143310-3022d14f9c3e ## explicit; go 1.20 github.com/ucwong/shard -# github.com/urfave/cli/v2 v2.27.0 +# github.com/urfave/cli/v2 v2.27.1 ## explicit; go 1.18 github.com/urfave/cli/v2 # github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e