From a8f07a775ee20e1e484d2952cc71aee8ea77054c Mon Sep 17 00:00:00 2001 From: southwest <1403572259@qq.com> Date: Wed, 8 Jan 2025 19:35:31 +0800 Subject: [PATCH] feat: add 'LoadTocCache' in Download message when starting a preheat job Signed-off-by: southwest <1403572259@qq.com> --- go.mod | 4 ++-- go.sum | 10 ++++++---- scheduler/job/job.go | 3 +++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 087a3208959..aa172e423ed 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module d7y.io/dragonfly/v2 go 1.23.0 require ( - d7y.io/api/v2 v2.0.177 + d7y.io/api/v2 v2.1.4 github.com/MysteriousPotato/go-lockable v1.0.0 github.com/RichardKnop/machinery v1.10.8 github.com/Showmax/go-fqdn v1.0.0 @@ -91,7 +91,7 @@ require ( golang.org/x/sys v0.28.0 golang.org/x/time v0.7.0 google.golang.org/api v0.205.0 - google.golang.org/grpc v1.68.0 + google.golang.org/grpc v1.69.2 google.golang.org/protobuf v1.36.1 gopkg.in/natefinch/lumberjack.v2 v2.0.0 gopkg.in/yaml.v3 v3.0.1 diff --git a/go.sum b/go.sum index dd884e6f188..6cc47beb87e 100644 --- a/go.sum +++ b/go.sum @@ -53,8 +53,8 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -d7y.io/api/v2 v2.0.177 h1:iC+Jm4n7lKs3N1JIO25XOdtELbKSlis85LEoGbYlp98= -d7y.io/api/v2 v2.0.177/go.mod h1:+l4ErhthKmcIhcRU6F01Km8q+yDyICF7JImefg0t6HY= +d7y.io/api/v2 v2.1.4 h1:mggiXUbJ29uGk97MU1bBoi5QdZhyjILQX1krCkvYBho= +d7y.io/api/v2 v2.1.4/go.mod h1:UsTlWa7mE9sk90KqKk6ZWQgXGWNDDpM8dsp8BZnz2d4= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= @@ -1627,6 +1627,8 @@ go.opentelemetry.io/otel/metric v1.33.0 h1:r+JOocAyeRVXD8lZpjdQjzMadVZp2M4WmQ+5W go.opentelemetry.io/otel/metric v1.33.0/go.mod h1:L9+Fyctbp6HFTddIxClbQkjtubW6O9QS3Ann/M82u6M= go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= +go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= +go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= go.opentelemetry.io/otel/trace v1.33.0 h1:cCJuF7LRjUFso9LPnEAHJDB2pqzp+hbO8eu1qqW2d/s= go.opentelemetry.io/otel/trace v1.33.0/go.mod h1:uIcdVUZMpTAmz0tI1z04GoVSezK37CbGV4fr1f2nBck= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= @@ -2190,8 +2192,8 @@ google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA5 google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= -google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= +google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= +google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/scheduler/job/job.go b/scheduler/job/job.go index c748515ac9b..8fa2c36e17b 100644 --- a/scheduler/job/job.go +++ b/scheduler/job/job.go @@ -307,6 +307,7 @@ func (j *job) preheatAllSeedPeers(ctx context.Context, taskID string, req *inter RequestHeader: req.Headers, Timeout: durationpb.New(req.Timeout), CertificateChain: req.CertificateChain, + LoadToCache: true, }}) if err != nil { log.Errorf("preheat failed: %s", err.Error()) @@ -448,6 +449,7 @@ func (j *job) preheatAllPeers(ctx context.Context, taskID string, req *internalj RequestHeader: req.Headers, Timeout: durationpb.New(req.Timeout), CertificateChain: req.CertificateChain, + LoadToCache: true, }}) if err != nil { log.Errorf("preheat failed: %s", err.Error()) @@ -590,6 +592,7 @@ func (j *job) preheatV2(ctx context.Context, taskID string, req *internaljob.Pre FilteredQueryParams: filteredQueryParams, RequestHeader: req.Headers, CertificateChain: req.CertificateChain, + LoadToCache: true, }}) if err != nil { log.Errorf("preheat failed: %s", err.Error())