Repository: dragonflyoss/Dragonfly2
Pull request #1019 (2022-01-20 13:04:53)

Add CDN get piece tasks result logs
Signed-off-by: sunwp <244372610@qq.com>

<!--- Provide a general summary of your changes in the Title above -->

## Description

<!--- Describe your changes in detail -->

## Related Issue

<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!--- Please link to the issue here: -->

## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->

## Screenshots (if appropriate):

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation Update (if none of the other choices apply)

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

- [ ] Code compiles correctly.
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.


codecov-commenter: # [Codecov](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/1019?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) Report
> Merging [#1019](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/1019?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) (fcd9059) into [main](https://codecov.io/gh/dragonflyoss/Dragonfly2/commit/2889ea30943165eb67f164a97c97eadcdf7dfb49?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) (2889ea3) will **increase** coverage by `0.31%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/1019/graphs/tree.svg?width=650&height=150&src=pr&token=PUICJYSAT7&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss)](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/1019?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss)

```diff
@@            Coverage Diff             @@
##             main    #1019      +/-   ##
==========================================
+ Coverage   45.64%   45.96%   +0.31%     
==========================================
  Files         128      128              
  Lines        9107     9134      +27     
==========================================
+ Hits         4157     4198      +41     
+ Misses       4479     4463      -16     
- Partials      471      473       +2     
```

| Flag | Coverage Δ | |
|---|---|---|
| Object-compatibility-e2etests | `?` | |
| e2etests | `?` | |
| unittests | `45.96% <ø> (+0.31%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/1019?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss) | Coverage Δ | |
|---|---|---|
| [cdn/supervisor/progress/progress.go](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/1019/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-Y2RuL3N1cGVydmlzb3IvcHJvZ3Jlc3MvcHJvZ3Jlc3MuZ28=) | `91.04% <0.00%> (-5.98%)` | :arrow_down: |
| [client/daemon/peer/peertask\_conductor.go](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/1019/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-Y2xpZW50L2RhZW1vbi9wZWVyL3BlZXJ0YXNrX2NvbmR1Y3Rvci5nbw==) | `57.33% <0.00%> (-0.02%)` | :arrow_down: |
| [scheduler/config/config.go](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/1019/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-c2NoZWR1bGVyL2NvbmZpZy9jb25maWcuZ28=) | `0.00% <0.00%> (ø)` | |
| [scheduler/resource/resource.go](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/1019/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-c2NoZWR1bGVyL3Jlc291cmNlL3Jlc291cmNlLmdv) | `82.60% <0.00%> (+0.79%)` | :arrow_up: |
| [scheduler/resource/task.go](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/1019/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-c2NoZWR1bGVyL3Jlc291cmNlL3Rhc2suZ28=) | `81.33% <0.00%> (+1.33%)` | :arrow_up: |
| [client/daemon/peer/peertask\_manager.go](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/1019/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-Y2xpZW50L2RhZW1vbi9wZWVyL3BlZXJ0YXNrX21hbmFnZXIuZ28=) | `44.15% <0.00%> (+2.26%)` | :arrow_up: |
| [scheduler/service/callback.go](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/1019/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-c2NoZWR1bGVyL3NlcnZpY2UvY2FsbGJhY2suZ28=) | `70.96% <0.00%> (+2.75%)` | :arrow_up: |
| [scheduler/resource/cdn.go](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/1019/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-c2NoZWR1bGVyL3Jlc291cmNlL2Nkbi5nbw==) | `54.20% <0.00%> (+5.53%)` | :arrow_up: |
| [scheduler/resource/cdn\_mock.go](https://codecov.io/gh/dragonflyoss/Dragonfly2/pull/1019/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dragonflyoss#diff-c2NoZWR1bGVyL3Jlc291cmNlL2Nkbl9tb2NrLmdv) | `23.21% <0.00%> (+23.21%)` | :arrow_up: |


Patch:
diff --git a/cdn/rpcserver/rpcserver.go b/cdn/rpcserver/rpcserver.go
index f7a571c9..1c71fcb7 100644
--- a/cdn/rpcserver/rpcserver.go
+++ b/cdn/rpcserver/rpcserver.go
@@ -170,9 +170,14 @@ func (css *Server) GetPieceTasks(ctx context.Context, req *base.PieceTaskRequest
 		if r := recover(); r != nil {
 			err = dferrors.Newf(base.Code_UnknownError, "get task(%s) piece tasks encounter an panic: %v", req.TaskId, r)
 			span.RecordError(err)
+		}
+		if err != nil {
 			logger.WithTaskID(req.TaskId).Errorf("get piece tasks failed: %v", err)
+		} else {
+			logger.WithTaskID(req.TaskId).Infof("get piece tasks success, availablePieceCount(%d), totalPieceCount(%d), pieceMd5Sign(%s), "+
+				"contentLength(%d)", len(piecePacket.PieceInfos), piecePacket.TotalPiece, piecePacket.PieceMd5Sign, piecePacket.ContentLength)
 		}
-		logger.WithTaskID(req.TaskId).Infof("get piece tasks result success: %t", err == nil)
+
 	}()
 	logger.Infof("get piece tasks: %#v", req)
 	seedTask, err := css.service.GetSeedTask(req.TaskId)
diff --git a/client/daemon/metrics/metrics.go b/client/daemon/metrics/metrics.go
index b6d1ef46..d97994e2 100644
--- a/client/daemon/metrics/metrics.go
+++ b/client/daemon/metrics/metrics.go
@@ -41,6 +41,13 @@ var (
 		Help:      "Counter of the total proxy request via Dragonfly.",
 	})
 
+	ProxyRequestNotViaDragonflyCount = promauto.NewCounter(prometheus.CounterOpts{
+		Namespace: constants.MetricsNamespace,
+		Subsystem: constants.DfdaemonMetricsName,
+		Name:      "proxy_request_not_via_dragonfly_total",
+		Help:      "Counter of the total proxy request not via Dragonfly.",
+	})
+
 	ProxyRequestRunningCount = promauto.NewGaugeVec(prometheus.GaugeOpts{
 		Namespace: constants.MetricsNamespace,
 		Subsystem: constants.DfdaemonMetricsName,
@@ -62,6 +69,27 @@ var (
 		Help:      "Counter of the total peer tasks.",
 	})
 
+	PeerTaskFailedCount = promauto.NewCounter(prometheus.CounterOpts{
+		Namespace: constants.MetricsNamespace,
+		Subsystem: constants.DfdaemonMetricsName,
+		Name:      "peer_task_failed_total",
+		Help:      "Counter of the total failed peer tasks.",
+	})
+
+	PieceTaskCount = promauto.NewCounter(prometheus.CounterOpts{
+		Namespace: constants.MetricsNamespace,
+		Subsystem: constants.DfdaemonMetricsName,
+		Name:      "piece_task_total",
+		Help:      "Counter of the total failed piece tasks.",
+	})
+
+	PieceTaskFailedCount = promauto.NewCounter(prometheus.CounterOpts{
+		Namespace: constants.MetricsNamespace,
+		Subsystem: constants.DfdaemonMetricsName,
+		Name:      "piece_task_failed_total",
+		Help:      "Counter of the total failed piece tasks.",
+	})
+
 	FileTaskCount = promauto.NewCounter(prometheus.CounterOpts{
 		Namespace: constants.MetricsNamespace,
 		Subsystem: constants.DfdaemonMetricsName,
@@ -76,18 +104,11 @@ var (
 		Help:      "Counter of the total stream tasks.",
 	})
 
-	PeerTaskFailedCount = promauto.NewCounter(prometheus.CounterOpts{
-		Namespace: constants.MetricsNamespace,
-		Subsystem: constants.DfdaemonMetricsName,
-		Name:      "peer_task_failed_total",
-		Help:      "Counter of the total failed peer tasks.",
-	})
-
-	PeerTaskReuseCount = promauto.NewCounter(prometheus.CounterOpts{
+	PeerTaskCacheHitCount = promauto.NewCounter(prometheus.CounterOpts{
 		Namespace: constants.MetricsNamespace,
 		Subsystem: constants.DfdaemonMetricsName,
-		Name:      "peer_task_reuse_total",
-		Help:      "Counter of the total reused peer tasks.",
+		Name:      "peer_task_cache_hit_total",
+		Help:      "Counter of the total cache hit peer tasks.",
 	})
 )
 
diff --git a/client/daemon/peer/peertask_conductor.go b/client/daemon/peer/peertask_conductor.go
index db146427..cf280059 100644
--- a/client/daemon/peer/peertask_conductor.go
+++ b/client/daemon/peer/peertask_conductor.go
@@ -142,7 +142,6 @@ type peerTaskConductor struct {
 }
 
 func (ptm *peerTaskManager) newPeerTaskConductor(ctx context.Context, request *scheduler.PeerTaskRequest, limit rate.Limit) *peerTaskConductor {
-	metrics.PeerTaskCount.Add(1)
 	// use a new context with span info
 	ctx = trace.ContextWithSpan(context.Background(), trace.SpanFromContext(ctx))
 	ctx, span := tracer.Start(ctx, config.SpanPeerTask, trace.WithSpanKind(trace.SpanKindClient))
@@ -1058,6 +1057,7 @@ func (pt *peerTaskConductor) ReportPieceResult(request *DownloadPieceRequest, re
 }
 
 func (pt *peerTaskConductor) reportSuccessResult(request *DownloadPieceRequest, result *DownloadPieceResult) {
+	metrics.PieceTaskCount.Add(1)
 	_, span := tracer.Start(pt.ctx, config.SpanReportPieceResult)
 	span.SetAttributes(config.AttributeWritePieceSuccess.Bool(true))
 
@@ -1083,6 +1083,7 @@ func (pt *peerTaskConductor) reportSuccessResult(request *DownloadPieceRequest,
 }
 
 func (pt *peerTaskConductor) reportFailResult(request *DownloadPieceRequest, result *DownloadPieceResult, code base.Code) {
+	metrics.PieceTaskFailedCount.Add(1)
 	_, span := tracer.Start(pt.ctx, config.SpanReportPieceResult)
 	span.SetAttributes(config.AttributeWritePieceSuccess.Bool(false))
 
@@ -1237,7 +1238,7 @@ func (pt *peerTaskConductor) fail() {
 	}()
 	pt.peerTaskManager.PeerTaskDone(pt.taskID)
 	var end = time.Now()
-	pt.Log().Errorf("stream peer task failed, code: %d, reason: %s", pt.failedCode, pt.failedReason)
+	pt.Log().Errorf("peer task failed, code: %d, reason: %s", pt.failedCode, pt.failedReason)
 
 	// send EOF piece result to scheduler
 	err := pt.peerPacketStream.Send(
diff --git a/client/daemon/peer/peertask_manager.go b/client/daemon/peer/peertask_manager.go
index 7ec8a2a4..bbccd6b1 100644
--- a/client/daemon/peer/peertask_manager.go
+++ b/client/daemon/peer/peertask_manager.go
@@ -189,10 +189,12 @@ func (ptm *peerTaskManager) getOrCreatePeerTaskConductor(
 	if p, ok := ptm.findPeerTaskConductor(taskID); ok {
 		ptm.conductorLock.Unlock()
 		logger.Debugf("peer task found: %s/%s", p.taskID, p.peerID)
+		metrics.PeerTaskCacheHitCount.Add(1)
 		return p, false, nil
 	}
 	ptm.runningPeerTasks.Store(taskID, ptc)
 	ptm.conductorLock.Unlock()
+	metrics.PeerTaskCount.Add(1)
 	return ptc, true, nil
 }
 
@@ -200,7 +202,7 @@ func (ptm *peerTaskManager) StartFileTask(ctx context.Context, req *FileTaskRequ
 	if ptm.enableMultiplex {
 		progress, ok := ptm.tryReuseFilePeerTask(ctx, req)
 		if ok {
-			metrics.PeerTaskReuseCount.Add(1)
+			metrics.PeerTaskCacheHitCount.Add(1)
 			return progress, nil, nil
 		}
 	}
@@ -235,7 +237,7 @@ func (ptm *peerTaskManager) StartStreamTask(ctx context.Context, req *StreamTask
 	if ptm.enableMultiplex {
 		r, attr, ok := ptm.tryReuseStreamPeerTask(ctx, peerTaskRequest)
 		if ok {
-			metrics.PeerTaskReuseCount.Add(1)
+			metrics.PeerTaskCacheHitCount.Add(1)
 			return r, attr, nil
 		}
 	}
diff --git a/client/daemon/proxy/proxy.go b/client/daemon/proxy/proxy.go
index 468313eb..0ff6a988 100644
--- a/client/daemon/proxy/proxy.go
+++ b/client/daemon/proxy/proxy.go
@@ -355,7 +355,6 @@ func (proxy *Proxy) handleHTTP(span trace.Span, w http.ResponseWriter, req *http
 	} else {
 		span.SetAttributes(semconv.HTTPResponseContentLengthKey.Int64(n))
 		// when resp.ContentLength == -1 or 0, byte count can not be updated by transport
-		// TODO how to handle byte count for https ?
 		if resp.ContentLength == -1 {
 			metrics.ProxyRequestBytesCount.WithLabelValues(req.Method).Add(float64(n))
 		}
@@ -497,11 +496,11 @@ func (proxy *Proxy) mirrorRegistry(w http.ResponseWriter, r *http.Request) {
 func (proxy *Proxy) remoteConfig(host string) *tls.Config {
 	for _, h := range proxy.httpsHosts {
 		if h.Regx.MatchString(host) {
-			config := &tls.Config{InsecureSkipVerify: h.Insecure}
+			tlsConfig := &tls.Config{InsecureSkipVerify: h.Insecure}
 			if h.Certs != nil {
-				config.RootCAs = h.Certs.CertPool
+				tlsConfig.RootCAs = h.Certs.CertPool
 			}
-			return config
+			return tlsConfig
 		}
 	}
 	return nil
@@ -587,9 +586,9 @@ func (proxy *Proxy) shouldUseDragonflyForMirror(req *http.Request) bool {
 	return transport.NeedUseDragonfly(req)
 }
 
-// tunnelHTTPS handles a CONNECT request and proxy an https request through an
-// http tunnel.
+// tunnelHTTPS handles the CONNECT request and proxy the https request through http tunnel.
 func tunnelHTTPS(w http.ResponseWriter, r *http.Request) {
+	metrics.ProxyRequestNotViaDragonflyCount.Add(1)
 	dst, err := net.DialTimeout("tcp", r.Host, 10*time.Second)
 	if err != nil {
 		http.Error(w, err.Error(), http.StatusServiceUnavailable)
diff --git a/client/daemon/transport/transport.go b/client/daemon/transport/transport.go
index 3aa7fa3a..d4288ee3 100644
--- a/client/daemon/transport/transport.go
+++ b/client/daemon/transport/transport.go
@@ -147,13 +147,18 @@ func New(options ...Option) (http.RoundTripper, error) {
 }
 
 // RoundTrip only process first redirect at present
-// TODO: fix resource release
 func (rt *transport) RoundTrip(req *http.Request) (resp *http.Response, err error) {
 	if rt.shouldUseDragonfly(req) {
 		// delete the Accept-Encoding header to avoid returning the same cached
 		// result for different requests
 		req.Header.Del("Accept-Encoding")
-		ctx := traceContext.Extract(req.Context(), propagation.HeaderCarrier(req.Header))
+
+		ctx := req.Context()
+		if req.URL.Scheme == "https" {
+			// for https, the trace info is in request header
+			ctx = traceContext.Extract(req.Context(), propagation.HeaderCarrier(req.Header))
+		}
+
 		logger.Debugf("round trip with dragonfly: %s", req.URL.String())
 		metrics.ProxyRequestViaDragonflyCount.Add(1)
 		resp, err = rt.download(ctx, req)
@@ -161,6 +166,7 @@ func (rt *transport) RoundTrip(req *http.Request) (resp *http.Response, err erro
 		logger.Debugf("round trip directly, method: %s, url: %s", req.Method, req.URL.String())
 		req.Host = req.URL.Host
 		req.Header.Set("Host", req.Host)
+		metrics.ProxyRequestNotViaDragonflyCount.Add(1)
 		resp, err = rt.baseRoundTripper.RoundTrip(req)
 	}
 
diff --git a/docs/en/troubleshooting/README.md b/docs/en/troubleshooting/README.md
index d2242f99..f05da769 100644
--- a/docs/en/troubleshooting/README.md
+++ b/docs/en/troubleshooting/README.md
@@ -1,5 +1,27 @@
 # Troubleshooting Guide
 
+## Change log level
+
+Send `SIGUSR1` signal to dragonfly process to change log level
+
+```shell
+kill -s SIGUSR1 <pid of dfdaemon, scheduler, cdn, or manager>
+```
+
+stdout:
+
+```text
+change log level to debug
+change log level to fatal
+change log level to panic
+change log level to dpanic
+change log level to error
+change log level to warn
+change log level to info
+```
+
+> The change log level event will print in stdout and `core.log` file, but if the level is greater than `info`, stdout only.
+
 ## Download slowly than without Dragonfly
 
 1. Confirm limit rate in [dfget.yaml](https://github.com/dragonflyoss/Dragonfly2/blob/main/docs/en/deployment/configuration/dfget.yaml#L65)
diff --git a/docs/zh-CN/troubleshooting/README.md b/docs/zh-CN/troubleshooting/README.md
index 18f37673..bc75f36a 100644
--- a/docs/zh-CN/troubleshooting/README.md
+++ b/docs/zh-CN/troubleshooting/README.md
@@ -1,5 +1,27 @@
 # 问题排查
 
+## 修改日志级别
+
+发送 `SIGUSR1` 信号给蜻蜓进程即可修改日志级别
+
+```shell
+kill -s SIGUSR1 <pid of dfdaemon, scheduler, cdn, or manager>
+```
+
+标准输出：
+
+```text
+change log level to debug
+change log level to fatal
+change log level to panic
+change log level to dpanic
+change log level to error
+change log level to warn
+change log level to info
+```
+
+> 修改日志级别的事件将记录在标准输出和 `core.log` 中，但是如果修改的级别高于 `info` 的话，则仅有标准输出
+
 ## 下载速度比不用蜻蜓的时候慢
 
 1. 确认限速值是否合适 [dfget.yaml](https://github.com/dragonflyoss/Dragonfly2/blob/main/docs/zh-CN/config/dfget.yaml#L61)
diff --git a/internal/dflog/logcore/init.go b/internal/dflog/logcore/init.go
index 67ecf9f9..7fc17930 100644
--- a/internal/dflog/logcore/init.go
+++ b/internal/dflog/logcore/init.go
@@ -20,9 +20,35 @@ import (
 	"path"
 	"path/filepath"
 
+	"go.uber.org/zap"
+
 	logger "d7y.io/dragonfly/v2/internal/dflog"
 )
 
+type logInitMeta struct {
+	fileName             string
+	setSugaredLoggerFunc func(*zap.SugaredLogger)
+	setLoggerFunc        func(log *zap.Logger)
+}
+
+func createLogger(meta []logInitMeta, logDir string) error {
+	for _, m := range meta {
+		log, level, err := CreateLogger(path.Join(logDir, m.fileName), false, false)
+		if err != nil {
+			return err
+		}
+		if m.setSugaredLoggerFunc != nil {
+			m.setSugaredLoggerFunc(log.Sugar())
+		} else {
+			m.setLoggerFunc(log)
+		}
+
+		levels = append(levels, level)
+	}
+	startLoggerSignalHandler()
+	return nil
+}
+
 func InitManager(console bool, dir string) error {
 	if console {
 		return nil
@@ -30,31 +56,26 @@ func InitManager(console bool, dir string) error {
 
 	logDir := filepath.Join(dir, "manager")
 
-	coreLogger, err := CreateLogger(path.Join(logDir, CoreLogFileName), false, false)
-	if err != nil {
-		return err
-	}
-	logger.SetCoreLogger(coreLogger.Sugar())
-
-	grpcLogger, err := CreateLogger(path.Join(logDir, GrpcLogFileName), false, false)
-	if err != nil {
-		return err
-	}
-	logger.SetGrpcLogger(grpcLogger.Sugar())
-
-	gcLogger, err := CreateLogger(path.Join(logDir, GCLogFileName), false, false)
-	if err != nil {
-		return err
-	}
-	logger.SetGCLogger(gcLogger.Sugar())
-
-	jobLogger, err := CreateLogger(path.Join(logDir, JobLogFileName), false, false)
-	if err != nil {
-		return err
-	}
-	logger.SetJobLogger(jobLogger.Sugar())
-
-	return nil
+	var meta = []logInitMeta{
+		{
+			fileName:             CoreLogFileName,
+			setSugaredLoggerFunc: logger.SetCoreLogger,
+		},
+		{
+			fileName:             GrpcLogFileName,
+			setSugaredLoggerFunc: logger.SetGrpcLogger,
+		},
+		{
+			fileName:             GCLogFileName,
+			setSugaredLoggerFunc: logger.SetGCLogger,
+		},
+		{
+			fileName:             JobLogFileName,
+			setSugaredLoggerFunc: logger.SetJobLogger,
+		},
+	}
+
+	return createLogger(meta, logDir)
 }
 
 func InitScheduler(console bool, dir string) error {
@@ -64,31 +85,26 @@ func InitScheduler(console bool, dir string) error {
 
 	logDir := filepath.Join(dir, "scheduler")
 
-	coreLogger, err := CreateLogger(path.Join(logDir, CoreLogFileName), false, false)
-	if err != nil {
-		return err
-	}
-	logger.SetCoreLogger(coreLogger.Sugar())
-
-	grpcLogger, err := CreateLogger(path.Join(logDir, GrpcLogFileName), false, false)
-	if err != nil {
-		return err
-	}
-	logger.SetGrpcLogger(grpcLogger.Sugar())
-
-	gcLogger, err := CreateLogger(path.Join(logDir, GCLogFileName), false, false)
-	if err != nil {
-		return err
-	}
-	logger.SetGCLogger(gcLogger.Sugar())
-
-	jobLogger, err := CreateLogger(path.Join(logDir, JobLogFileName), false, false)
-	if err != nil {
-		return err
-	}
-	logger.SetJobLogger(jobLogger.Sugar())
-
-	return nil
+	var meta = []logInitMeta{
+		{
+			fileName:             CoreLogFileName,
+			setSugaredLoggerFunc: logger.SetCoreLogger,
+		},
+		{
+			fileName:             GrpcLogFileName,
+			setSugaredLoggerFunc: logger.SetGrpcLogger,
+		},
+		{
+			fileName:             GCLogFileName,
+			setSugaredLoggerFunc: logger.SetGCLogger,
+		},
+		{
+			fileName:             JobLogFileName,
+			setSugaredLoggerFunc: logger.SetJobLogger,
+		},
+	}
+
+	return createLogger(meta, logDir)
 }
 
 func InitCdnSystem(console bool, dir string) error {
@@ -97,55 +113,42 @@ func InitCdnSystem(console bool, dir string) error {
 	}
 
 	logDir := filepath.Join(dir, "cdn")
-
-	coreLogger, err := CreateLogger(path.Join(logDir, CoreLogFileName), false, false)
-	if err != nil {
-		return err
-	}
-	logger.SetCoreLogger(coreLogger.Sugar())
-
-	grpcLogger, err := CreateLogger(path.Join(logDir, GrpcLogFileName), false, false)
-	if err != nil {
-		return err
-	}
-	logger.SetGrpcLogger(grpcLogger.Sugar())
-
-	gcLogger, err := CreateLogger(path.Join(logDir, GCLogFileName), false, false)
-	if err != nil {
-		return err
-	}
-	logger.SetGCLogger(gcLogger.Sugar())
-
-	storageGCLogger, err := CreateLogger(path.Join(logDir, StorageGCLogFileName), false, false)
-	if err != nil {
-		return err
-	}
-	logger.SetGCLogger(storageGCLogger.Sugar())
-
-	jobLogger, err := CreateLogger(path.Join(logDir, JobLogFileName), false, false)
-	if err != nil {
-		return err
-	}
-	logger.SetJobLogger(jobLogger.Sugar())
-
-	statSeedLogger, err := CreateLogger(path.Join(logDir, StatSeedLogFileName), true, true)
-	if err != nil {
-		return err
-	}
-	logger.SetStatSeedLogger(statSeedLogger)
-
-	downloaderLogger, err := CreateLogger(path.Join(logDir, DownloaderLogFileName), false, false)
-	if err != nil {
-		return err
-	}
-	logger.SetDownloadLogger(downloaderLogger)
-
-	keepAliveLogger, err := CreateLogger(path.Join(logDir, KeepAliveLogFileName), false, false)
-	if err != nil {
-		return err
-	}
-	logger.SetKeepAliveLogger(keepAliveLogger.Sugar())
-	return nil
+	var meta = []logInitMeta{
+		{
+			fileName:             CoreLogFileName,
+			setSugaredLoggerFunc: logger.SetCoreLogger,
+		},
+		{
+			fileName:             GrpcLogFileName,
+			setSugaredLoggerFunc: logger.SetGrpcLogger,
+		},
+		{
+			fileName:             GCLogFileName,
+			setSugaredLoggerFunc: logger.SetGCLogger,
+		},
+		{
+			fileName:             StorageGCLogFileName,
+			setSugaredLoggerFunc: logger.SetStorageGCLogger,
+		},
+		{
+			fileName:             JobLogFileName,
+			setSugaredLoggerFunc: logger.SetJobLogger,
+		},
+		{
+			fileName:      StatSeedLogFileName,
+			setLoggerFunc: logger.SetStatSeedLogger,
+		},
+		{
+			fileName:      DownloaderLogFileName,
+			setLoggerFunc: logger.SetDownloadLogger,
+		},
+		{
+			fileName:             KeepAliveLogFileName,
+			setSugaredLoggerFunc: logger.SetKeepAliveLogger,
+		},
+	}
+
+	return createLogger(meta, logDir)
 }
 
 func InitDaemon(console bool, dir string) error {
@@ -155,25 +158,22 @@ func InitDaemon(console bool, dir string) error {
 
 	logDir := filepath.Join(dir, "daemon")
 
-	coreLogger, err := CreateLogger(path.Join(logDir, CoreLogFileName), false, false)
-	if err != nil {
-		return err
-	}
-	logger.SetCoreLogger(coreLogger.Sugar())
-
-	grpcLogger, err := CreateLogger(path.Join(logDir, GrpcLogFileName), false, false)
-	if err != nil {
-		return err
-	}
-	logger.SetGrpcLogger(grpcLogger.Sugar())
-
-	gcLogger, err := CreateLogger(path.Join(logDir, GCLogFileName), false, false)
-	if err != nil {
-		return err
-	}
-	logger.SetGCLogger(gcLogger.Sugar())
-
-	return nil
+	var meta = []logInitMeta{
+		{
+			fileName:             CoreLogFileName,
+			setSugaredLoggerFunc: logger.SetCoreLogger,
+		},
+		{
+			fileName:             GrpcLogFileName,
+			setSugaredLoggerFunc: logger.SetGrpcLogger,
+		},
+		{
+			fileName:             GCLogFileName,
+			setSugaredLoggerFunc: logger.SetGCLogger,
+		},
+	}
+
+	return createLogger(meta, logDir)
 }
 
 func InitDfget(console bool, dir string) error {
@@ -183,17 +183,16 @@ func InitDfget(console bool, dir string) error {
 
 	logDir := filepath.Join(dir, "dfget")
 
-	coreLogger, err := CreateLogger(path.Join(logDir, CoreLogFileName), false, false)
-	if err != nil {
-		return err
+	var meta = []logInitMeta{
+		{
+			fileName:             CoreLogFileName,
+			setSugaredLoggerFunc: logger.SetCoreLogger,
+		},
+		{
+			fileName:             GrpcLogFileName,
+			setSugaredLoggerFunc: logger.SetGrpcLogger,
+		},
 	}
-	logger.SetCoreLogger(coreLogger.Sugar())
 
-	grpcLogger, err := CreateLogger(path.Join(logDir, GrpcLogFileName), false, false)
-	if err != nil {
-		return err
-	}
-	logger.SetGrpcLogger(grpcLogger.Sugar())
-
-	return nil
+	return createLogger(meta, logDir)
 }
diff --git a/internal/dflog/logcore/logcore.go b/internal/dflog/logcore/logcore.go
index 8fbeb7ba..74617f99 100644
--- a/internal/dflog/logcore/logcore.go
+++ b/internal/dflog/logcore/logcore.go
@@ -48,7 +48,7 @@ const (
 var coreLevel = zap.NewAtomicLevelAt(zapcore.InfoLevel)
 var grpcLevel = zap.NewAtomicLevelAt(zapcore.WarnLevel)
 
-func CreateLogger(filePath string, compress bool, stats bool) (*zap.Logger, error) {
+func CreateLogger(filePath string, compress bool, stats bool) (*zap.Logger, zap.AtomicLevel, error) {
 	rotateConfig := &lumberjack.Logger{
 		Filename:   filePath,
 		MaxSize:    defaultRotateMaxSize,
@@ -80,7 +80,7 @@ func CreateLogger(filePath string, compress bool, stats bool) (*zap.Logger, erro
 		opts = append(opts, zap.AddCaller(), zap.AddStacktrace(zap.WarnLevel), zap.AddCallerSkip(1))
 	}
 
-	return zap.New(core, opts...), nil
+	return zap.New(core, opts...), level, nil
 }
 
 func SetCoreLevel(level zapcore.Level) {
diff --git a/internal/dflog/logcore/signal.go b/internal/dflog/logcore/signal.go
new file mode 100644
index 00000000..ac57fe6a
--- /dev/null
+++ b/internal/dflog/logcore/signal.go
@@ -0,0 +1,58 @@
+/*
+ *     Copyright 2022 The Dragonfly Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package logcore
+
+import (
+	"fmt"
+	"os"
+	"os/signal"
+	"syscall"
+
+	"go.uber.org/zap"
+	"go.uber.org/zap/zapcore"
+
+	logger "d7y.io/dragonfly/v2/internal/dflog"
+)
+
+var (
+	levels []zap.AtomicLevel
+	level  = zapcore.InfoLevel
+)
+
+func startLoggerSignalHandler() {
+	signals := make(chan os.Signal, 1)
+	signal.Notify(signals, syscall.SIGUSR1)
+
+	go func() {
+		for {
+			select {
+			case <-signals:
+				level--
+				if level < zapcore.DebugLevel {
+					level = zapcore.FatalLevel
+				}
+
+				// use fmt.Printf print change log level event when log level is greater than info level
+				fmt.Printf("change log level to %s\n", level.String())
+				logger.Infof("change log level to %s", level.String())
+				for _, l := range levels {
+					l.SetLevel(level)
+				}
+			}
+		}
+	}()
+}
diff --git a/manager/types/config.go b/manager/types/config.go
index a36b3413..3568cc77 100644
--- a/manager/types/config.go
+++ b/manager/types/config.go
@@ -16,6 +16,11 @@
 
 package types
 
+const (
+	// Server is boot
+	IsBootConfigName = "is_boot"
+)
+
 type ConfigParams struct {
 	ID uint `uri:"id" binding:"required"`
 }
diff --git a/pkg/log/log.go b/pkg/log/log.go
index 1ba5cbb2..bcfa820d 100644
--- a/pkg/log/log.go
+++ b/pkg/log/log.go
@@ -17,11 +17,8 @@
 package log
 
 import (
-	"path"
-
 	"go.uber.org/zap/zapcore"
 
-	logger "d7y.io/dragonfly/v2/internal/dflog"
 	"d7y.io/dragonfly/v2/internal/dflog/logcore"
 	"d7y.io/dragonfly/v2/pkg/dfpath"
 )
@@ -52,25 +49,5 @@ func SetupDaemon(logDir string, console bool) error {
 		return err
 	}
 
-	logDir = path.Join(d.LogDir(), "daemon")
-
-	coreLogger, err := logcore.CreateLogger(path.Join(logDir, logcore.CoreLogFileName), false, false)
-	if err != nil {
-		return err
-	}
-	logger.SetCoreLogger(coreLogger.Sugar())
-
-	grpcLogger, err := logcore.CreateLogger(path.Join(logDir, logcore.GrpcLogFileName), false, false)
-	if err != nil {
-		return err
-	}
-	logger.SetGrpcLogger(grpcLogger.Sugar())
-
-	gcLogger, err := logcore.CreateLogger(path.Join(logDir, logcore.GCLogFileName), false, false)
-	if err != nil {
-		return err
-	}
-	logger.SetGCLogger(gcLogger.Sugar())
-
-	return nil
+	return logcore.InitDaemon(false, d.LogDir())
 }
diff --git a/pkg/rpc/base/base.pb.go b/pkg/rpc/base/base.pb.go
index cd2c83b1..640eb354 100644
--- a/pkg/rpc/base/base.pb.go
+++ b/pkg/rpc/base/base.pb.go
@@ -15,19 +15,18 @@
 
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.26.0
+// 	protoc-gen-go v1.27.1
 // 	protoc        v3.17.3
 // source: pkg/rpc/base/base.proto
 
 package base
 
 import (
-	reflect "reflect"
-	sync "sync"
-
 	_ "github.com/envoyproxy/protoc-gen-validate/validate"
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
 )
 
 const (
@@ -67,7 +66,7 @@ const (
 	Code_SchedNeedBackSource            Code = 5001 // client should try to download from source
 	Code_SchedPeerGone                  Code = 5002 // client should disconnect from scheduler
 	Code_SchedPeerNotFound              Code = 5004 // peer not found in scheduler
-	Code_SchedPeerPieceResultReportFail Code = 5005 // report piece failed
+	Code_SchedPeerPieceResultReportFail Code = 5005 // report piece
 	Code_SchedTaskStatusError           Code = 5006 // task status is fail
 	// cdnsystem response error 6000-6999
 	Code_CDNError            Code = 6000
@@ -96,6 +95,8 @@ var (
 		4004: "ClientWaitPieceReady",
 		4005: "ClientPieceDownloadFail",
 		4006: "ClientRequestLimitFail",
+		4007: "ClientConnectionError",
+		4404: "ClientPieceNotFound",
 		5000: "SchedError",
 		5001: "SchedNeedBackSource",
 		5002: "SchedPeerGone",
@@ -124,6 +125,8 @@ var (
 		"ClientWaitPieceReady":           4004,
 		"ClientPieceDownloadFail":        4005,
 		"ClientRequestLimitFail":         4006,
+		"ClientConnectionError":          4007,
+		"ClientPieceNotFound":            4404,
 		"SchedError":                     5000,
 		"SchedNeedBackSource":            5001,
 		"SchedPeerGone":                  5002,
@@ -821,7 +824,7 @@ var file_pkg_rpc_base_base_proto_rawDesc = []byte{
 	0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, 0x67,
 	0x74, 0x68, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x69, 0x65, 0x63, 0x65, 0x5f, 0x6d, 0x64, 0x35, 0x5f,
 	0x73, 0x69, 0x67, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x69, 0x65, 0x63,
-	0x65, 0x4d, 0x64, 0x35, 0x53, 0x69, 0x67, 0x6e, 0x2a, 0xeb, 0x04, 0x0a, 0x04, 0x43, 0x6f, 0x64,
+	0x65, 0x4d, 0x64, 0x35, 0x53, 0x69, 0x67, 0x6e, 0x2a, 0xa1, 0x05, 0x0a, 0x04, 0x43, 0x6f, 0x64,
 	0x65, 0x12, 0x11, 0x0a, 0x0d, 0x58, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
 	0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10,
 	0xc8, 0x01, 0x12, 0x16, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x6e, 0x61, 0x76,
@@ -843,31 +846,34 @@ var file_pkg_rpc_base_base_proto_rawDesc = []byte{
 	0x1f, 0x12, 0x1c, 0x0a, 0x17, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65,
 	0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x61, 0x69, 0x6c, 0x10, 0xa5, 0x1f, 0x12,
 	0x1b, 0x0a, 0x16, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
-	0x4c, 0x69, 0x6d, 0x69, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x10, 0xa6, 0x1f, 0x12, 0x0f, 0x0a, 0x0a,
-	0x53, 0x63, 0x68, 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x88, 0x27, 0x12, 0x18, 0x0a,
-	0x13, 0x53, 0x63, 0x68, 0x65, 0x64, 0x4e, 0x65, 0x65, 0x64, 0x42, 0x61, 0x63, 0x6b, 0x53, 0x6f,
-	0x75, 0x72, 0x63, 0x65, 0x10, 0x89, 0x27, 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x63, 0x68, 0x65, 0x64,
-	0x50, 0x65, 0x65, 0x72, 0x47, 0x6f, 0x6e, 0x65, 0x10, 0x8a, 0x27, 0x12, 0x16, 0x0a, 0x11, 0x53,
-	0x63, 0x68, 0x65, 0x64, 0x50, 0x65, 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64,
-	0x10, 0x8c, 0x27, 0x12, 0x23, 0x0a, 0x1e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x50, 0x65, 0x65, 0x72,
-	0x50, 0x69, 0x65, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x72,
-	0x74, 0x46, 0x61, 0x69, 0x6c, 0x10, 0x8d, 0x27, 0x12, 0x19, 0x0a, 0x14, 0x53, 0x63, 0x68, 0x65,
-	0x64, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x72, 0x72, 0x6f, 0x72,
-	0x10, 0x8e, 0x27, 0x12, 0x0d, 0x0a, 0x08, 0x43, 0x44, 0x4e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10,
-	0xf0, 0x2e, 0x12, 0x18, 0x0a, 0x13, 0x43, 0x44, 0x4e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x67,
-	0x69, 0x73, 0x74, 0x72, 0x79, 0x46, 0x61, 0x69, 0x6c, 0x10, 0xf1, 0x2e, 0x12, 0x18, 0x0a, 0x13,
-	0x43, 0x44, 0x4e, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46,
-	0x61, 0x69, 0x6c, 0x10, 0xf2, 0x2e, 0x12, 0x14, 0x0a, 0x0f, 0x43, 0x44, 0x4e, 0x54, 0x61, 0x73,
-	0x6b, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x84, 0x32, 0x12, 0x18, 0x0a, 0x13,
-	0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54,
-	0x79, 0x70, 0x65, 0x10, 0xd9, 0x36, 0x2a, 0x17, 0x0a, 0x0a, 0x50, 0x69, 0x65, 0x63, 0x65, 0x53,
-	0x74, 0x79, 0x6c, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x4c, 0x41, 0x49, 0x4e, 0x10, 0x00, 0x2a,
-	0x2c, 0x0a, 0x09, 0x53, 0x69, 0x7a, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06,
-	0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x4d, 0x41, 0x4c,
-	0x4c, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x49, 0x4e, 0x59, 0x10, 0x02, 0x42, 0x22, 0x5a,
-	0x20, 0x64, 0x37, 0x79, 0x2e, 0x69, 0x6f, 0x2f, 0x64, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x66, 0x6c,
-	0x79, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x62, 0x61, 0x73,
-	0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x4c, 0x69, 0x6d, 0x69, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x10, 0xa6, 0x1f, 0x12, 0x1a, 0x0a, 0x15,
+	0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+	0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xa7, 0x1f, 0x12, 0x18, 0x0a, 0x13, 0x43, 0x6c, 0x69, 0x65,
+	0x6e, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10,
+	0xb4, 0x22, 0x12, 0x0f, 0x0a, 0x0a, 0x53, 0x63, 0x68, 0x65, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72,
+	0x10, 0x88, 0x27, 0x12, 0x18, 0x0a, 0x13, 0x53, 0x63, 0x68, 0x65, 0x64, 0x4e, 0x65, 0x65, 0x64,
+	0x42, 0x61, 0x63, 0x6b, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x10, 0x89, 0x27, 0x12, 0x12, 0x0a,
+	0x0d, 0x53, 0x63, 0x68, 0x65, 0x64, 0x50, 0x65, 0x65, 0x72, 0x47, 0x6f, 0x6e, 0x65, 0x10, 0x8a,
+	0x27, 0x12, 0x16, 0x0a, 0x11, 0x53, 0x63, 0x68, 0x65, 0x64, 0x50, 0x65, 0x65, 0x72, 0x4e, 0x6f,
+	0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x8c, 0x27, 0x12, 0x23, 0x0a, 0x1e, 0x53, 0x63, 0x68,
+	0x65, 0x64, 0x50, 0x65, 0x65, 0x72, 0x50, 0x69, 0x65, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c,
+	0x74, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x10, 0x8d, 0x27, 0x12, 0x19,
+	0x0a, 0x14, 0x53, 0x63, 0x68, 0x65, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75,
+	0x73, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x8e, 0x27, 0x12, 0x0d, 0x0a, 0x08, 0x43, 0x44, 0x4e,
+	0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xf0, 0x2e, 0x12, 0x18, 0x0a, 0x13, 0x43, 0x44, 0x4e, 0x54,
+	0x61, 0x73, 0x6b, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x46, 0x61, 0x69, 0x6c, 0x10,
+	0xf1, 0x2e, 0x12, 0x18, 0x0a, 0x13, 0x43, 0x44, 0x4e, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x6f, 0x77,
+	0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x61, 0x69, 0x6c, 0x10, 0xf2, 0x2e, 0x12, 0x14, 0x0a, 0x0f,
+	0x43, 0x44, 0x4e, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10,
+	0x84, 0x32, 0x12, 0x18, 0x0a, 0x13, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x52, 0x65, 0x73,
+	0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x10, 0xd9, 0x36, 0x2a, 0x17, 0x0a, 0x0a,
+	0x50, 0x69, 0x65, 0x63, 0x65, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x4c,
+	0x41, 0x49, 0x4e, 0x10, 0x00, 0x2a, 0x2c, 0x0a, 0x09, 0x53, 0x69, 0x7a, 0x65, 0x53, 0x63, 0x6f,
+	0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x09,
+	0x0a, 0x05, 0x53, 0x4d, 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x49, 0x4e,
+	0x59, 0x10, 0x02, 0x42, 0x22, 0x5a, 0x20, 0x64, 0x37, 0x79, 0x2e, 0x69, 0x6f, 0x2f, 0x64, 0x72,
+	0x61, 0x67, 0x6f, 0x6e, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x72,
+	0x70, 0x63, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
diff --git a/pkg/rpc/base/base.pb.validate.go b/pkg/rpc/base/base.pb.validate.go
index f6d1d5c6..84e75adb 100644
--- a/pkg/rpc/base/base.pb.validate.go
+++ b/pkg/rpc/base/base.pb.validate.go
@@ -34,62 +34,25 @@ var (
 )
 
 // Validate checks the field values on GrpcDfError with the rules defined in
-// the proto definition for this message. If any rules are violated, the first
-// error encountered is returned, or nil if there are no violations.
+// the proto definition for this message. If any rules are violated, an error
+// is returned.
 func (m *GrpcDfError) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on GrpcDfError with the rules defined in
-// the proto definition for this message. If any rules are violated, the
-// result is a list of violation errors wrapped in GrpcDfErrorMultiError, or
-// nil if none found.
-func (m *GrpcDfError) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *GrpcDfError) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if _, ok := Code_name[int32(m.GetCode())]; !ok {
-		err := GrpcDfErrorValidationError{
+		return GrpcDfErrorValidationError{
 			field:  "Code",
 			reason: "value must be one of the defined enum values",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	// no validation rules for Message
 
-	if len(errors) > 0 {
-		return GrpcDfErrorMultiError(errors)
-	}
 	return nil
 }
 
-// GrpcDfErrorMultiError is an error wrapping multiple validation errors
-// returned by GrpcDfError.ValidateAll() if the designated constraints aren't met.
-type GrpcDfErrorMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m GrpcDfErrorMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m GrpcDfErrorMultiError) AllErrors() []error { return m }
-
 // GrpcDfErrorValidationError is the validation error returned by
 // GrpcDfError.Validate if the designated constraints aren't met.
 type GrpcDfErrorValidationError struct {
@@ -145,37 +108,19 @@ var _ interface {
 } = GrpcDfErrorValidationError{}
 
 // Validate checks the field values on UrlMeta with the rules defined in the
-// proto definition for this message. If any rules are violated, the first
-// error encountered is returned, or nil if there are no violations.
+// proto definition for this message. If any rules are violated, an error is returned.
 func (m *UrlMeta) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on UrlMeta with the rules defined in the
-// proto definition for this message. If any rules are violated, the result is
-// a list of violation errors wrapped in UrlMetaMultiError, or nil if none found.
-func (m *UrlMeta) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *UrlMeta) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if m.GetDigest() != "" {
 
 		if !_UrlMeta_Digest_Pattern.MatchString(m.GetDigest()) {
-			err := UrlMetaValidationError{
+			return UrlMetaValidationError{
 				field:  "Digest",
 				reason: "value does not match regex pattern \"^(md5)|(sha256):[A-Fa-f0-9]+$\"",
 			}
-			if !all {
-				return err
-			}
-			errors = append(errors, err)
 		}
 
 	}
@@ -185,14 +130,10 @@ func (m *UrlMeta) validate(all bool) error {
 	if m.GetRange() != "" {
 
 		if !_UrlMeta_Range_Pattern.MatchString(m.GetRange()) {
-			err := UrlMetaValidationError{
+			return UrlMetaValidationError{
 				field:  "Range",
 				reason: "value does not match regex pattern \"^[0-9]+-[0-9]+$\"",
 			}
-			if !all {
-				return err
-			}
-			errors = append(errors, err)
 		}
 
 	}
@@ -201,28 +142,9 @@ func (m *UrlMeta) validate(all bool) error {
 
 	// no validation rules for Header
 
-	if len(errors) > 0 {
-		return UrlMetaMultiError(errors)
-	}
 	return nil
 }
 
-// UrlMetaMultiError is an error wrapping multiple validation errors returned
-// by UrlMeta.ValidateAll() if the designated constraints aren't met.
-type UrlMetaMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m UrlMetaMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m UrlMetaMultiError) AllErrors() []error { return m }
-
 // UrlMetaValidationError is the validation error returned by UrlMeta.Validate
 // if the designated constraints aren't met.
 type UrlMetaValidationError struct {
@@ -282,82 +204,36 @@ var _UrlMeta_Digest_Pattern = regexp.MustCompile("^(md5)|(sha256):[A-Fa-f0-9]+$"
 var _UrlMeta_Range_Pattern = regexp.MustCompile("^[0-9]+-[0-9]+$")
 
 // Validate checks the field values on HostLoad with the rules defined in the
-// proto definition for this message. If any rules are violated, the first
-// error encountered is returned, or nil if there are no violations.
+// proto definition for this message. If any rules are violated, an error is returned.
 func (m *HostLoad) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on HostLoad with the rules defined in
-// the proto definition for this message. If any rules are violated, the
-// result is a list of violation errors wrapped in HostLoadMultiError, or nil
-// if none found.
-func (m *HostLoad) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *HostLoad) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if val := m.GetCpuRatio(); val < 0 || val > 1 {
-		err := HostLoadValidationError{
+		return HostLoadValidationError{
 			field:  "CpuRatio",
 			reason: "value must be inside range [0, 1]",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if val := m.GetMemRatio(); val < 0 || val > 1 {
-		err := HostLoadValidationError{
+		return HostLoadValidationError{
 			field:  "MemRatio",
 			reason: "value must be inside range [0, 1]",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if val := m.GetDiskRatio(); val < 0 || val > 1 {
-		err := HostLoadValidationError{
+		return HostLoadValidationError{
 			field:  "DiskRatio",
 			reason: "value must be inside range [0, 1]",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
-	if len(errors) > 0 {
-		return HostLoadMultiError(errors)
-	}
 	return nil
 }
 
-// HostLoadMultiError is an error wrapping multiple validation errors returned
-// by HostLoad.ValidateAll() if the designated constraints aren't met.
-type HostLoadMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m HostLoadMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m HostLoadMultiError) AllErrors() []error { return m }
-
 // HostLoadValidationError is the validation error returned by
 // HostLoad.Validate if the designated constraints aren't met.
 type HostLoadValidationError struct {
@@ -413,105 +289,51 @@ var _ interface {
 } = HostLoadValidationError{}
 
 // Validate checks the field values on PieceTaskRequest with the rules defined
-// in the proto definition for this message. If any rules are violated, the
-// first error encountered is returned, or nil if there are no violations.
+// in the proto definition for this message. If any rules are violated, an
+// error is returned.
 func (m *PieceTaskRequest) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on PieceTaskRequest with the rules
-// defined in the proto definition for this message. If any rules are
-// violated, the result is a list of violation errors wrapped in
-// PieceTaskRequestMultiError, or nil if none found.
-func (m *PieceTaskRequest) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *PieceTaskRequest) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if utf8.RuneCountInString(m.GetTaskId()) < 1 {
-		err := PieceTaskRequestValidationError{
+		return PieceTaskRequestValidationError{
 			field:  "TaskId",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if utf8.RuneCountInString(m.GetSrcPid()) < 1 {
-		err := PieceTaskRequestValidationError{
+		return PieceTaskRequestValidationError{
 			field:  "SrcPid",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if utf8.RuneCountInString(m.GetDstPid()) < 1 {
-		err := PieceTaskRequestValidationError{
+		return PieceTaskRequestValidationError{
 			field:  "DstPid",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if m.GetStartNum() < 0 {
-		err := PieceTaskRequestValidationError{
+		return PieceTaskRequestValidationError{
 			field:  "StartNum",
 			reason: "value must be greater than or equal to 0",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if m.GetLimit() < 0 {
-		err := PieceTaskRequestValidationError{
+		return PieceTaskRequestValidationError{
 			field:  "Limit",
 			reason: "value must be greater than or equal to 0",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
-	if len(errors) > 0 {
-		return PieceTaskRequestMultiError(errors)
-	}
 	return nil
 }
 
-// PieceTaskRequestMultiError is an error wrapping multiple validation errors
-// returned by PieceTaskRequest.ValidateAll() if the designated constraints
-// aren't met.
-type PieceTaskRequestMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m PieceTaskRequestMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m PieceTaskRequestMultiError) AllErrors() []error { return m }
-
 // PieceTaskRequestValidationError is the validation error returned by
 // PieceTaskRequest.Validate if the designated constraints aren't met.
 type PieceTaskRequestValidationError struct {
@@ -567,101 +389,51 @@ var _ interface {
 } = PieceTaskRequestValidationError{}
 
 // Validate checks the field values on PieceInfo with the rules defined in the
-// proto definition for this message. If any rules are violated, the first
-// error encountered is returned, or nil if there are no violations.
+// proto definition for this message. If any rules are violated, an error is returned.
 func (m *PieceInfo) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on PieceInfo with the rules defined in
-// the proto definition for this message. If any rules are violated, the
-// result is a list of violation errors wrapped in PieceInfoMultiError, or nil
-// if none found.
-func (m *PieceInfo) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *PieceInfo) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	// no validation rules for PieceNum
 
 	if m.GetRangeStart() < 0 {
-		err := PieceInfoValidationError{
+		return PieceInfoValidationError{
 			field:  "RangeStart",
 			reason: "value must be greater than or equal to 0",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if m.GetRangeSize() < 0 {
-		err := PieceInfoValidationError{
+		return PieceInfoValidationError{
 			field:  "RangeSize",
 			reason: "value must be greater than or equal to 0",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if m.GetPieceMd5() != "" {
 
 		if !_PieceInfo_PieceMd5_Pattern.MatchString(m.GetPieceMd5()) {
-			err := PieceInfoValidationError{
+			return PieceInfoValidationError{
 				field:  "PieceMd5",
 				reason: "value does not match regex pattern \"([a-f\\\\d]{32}|[A-F\\\\d]{32}|[a-f\\\\d]{16}|[A-F\\\\d]{16})\"",
 			}
-			if !all {
-				return err
-			}
-			errors = append(errors, err)
 		}
 
 	}
 
 	if m.GetPieceOffset() < 0 {
-		err := PieceInfoValidationError{
+		return PieceInfoValidationError{
 			field:  "PieceOffset",
 			reason: "value must be greater than or equal to 0",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	// no validation rules for PieceStyle
 
-	if len(errors) > 0 {
-		return PieceInfoMultiError(errors)
-	}
 	return nil
 }
 
-// PieceInfoMultiError is an error wrapping multiple validation errors returned
-// by PieceInfo.ValidateAll() if the designated constraints aren't met.
-type PieceInfoMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m PieceInfoMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m PieceInfoMultiError) AllErrors() []error { return m }
-
 // PieceInfoValidationError is the validation error returned by
 // PieceInfo.Validate if the designated constraints aren't met.
 type PieceInfoValidationError struct {
@@ -719,83 +491,38 @@ var _ interface {
 var _PieceInfo_PieceMd5_Pattern = regexp.MustCompile("([a-f\\d]{32}|[A-F\\d]{32}|[a-f\\d]{16}|[A-F\\d]{16})")
 
 // Validate checks the field values on PiecePacket with the rules defined in
-// the proto definition for this message. If any rules are violated, the first
-// error encountered is returned, or nil if there are no violations.
+// the proto definition for this message. If any rules are violated, an error
+// is returned.
 func (m *PiecePacket) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on PiecePacket with the rules defined in
-// the proto definition for this message. If any rules are violated, the
-// result is a list of violation errors wrapped in PiecePacketMultiError, or
-// nil if none found.
-func (m *PiecePacket) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *PiecePacket) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if utf8.RuneCountInString(m.GetTaskId()) < 1 {
-		err := PiecePacketValidationError{
+		return PiecePacketValidationError{
 			field:  "TaskId",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if utf8.RuneCountInString(m.GetDstPid()) < 1 {
-		err := PiecePacketValidationError{
+		return PiecePacketValidationError{
 			field:  "DstPid",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if utf8.RuneCountInString(m.GetDstAddr()) < 1 {
-		err := PiecePacketValidationError{
+		return PiecePacketValidationError{
 			field:  "DstAddr",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	for idx, item := range m.GetPieceInfos() {
 		_, _ = idx, item
 
-		if all {
-			switch v := interface{}(item).(type) {
-			case interface{ ValidateAll() error }:
-				if err := v.ValidateAll(); err != nil {
-					errors = append(errors, PiecePacketValidationError{
-						field:  fmt.Sprintf("PieceInfos[%v]", idx),
-						reason: "embedded message failed validation",
-						cause:  err,
-					})
-				}
-			case interface{ Validate() error }:
-				if err := v.Validate(); err != nil {
-					errors = append(errors, PiecePacketValidationError{
-						field:  fmt.Sprintf("PieceInfos[%v]", idx),
-						reason: "embedded message failed validation",
-						cause:  err,
-					})
-				}
-			}
-		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
 			if err := v.Validate(); err != nil {
 				return PiecePacketValidationError{
 					field:  fmt.Sprintf("PieceInfos[%v]", idx),
@@ -813,28 +540,9 @@ func (m *PiecePacket) validate(all bool) error {
 
 	// no validation rules for PieceMd5Sign
 
-	if len(errors) > 0 {
-		return PiecePacketMultiError(errors)
-	}
 	return nil
 }
 
-// PiecePacketMultiError is an error wrapping multiple validation errors
-// returned by PiecePacket.ValidateAll() if the designated constraints aren't met.
-type PiecePacketMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m PiecePacketMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m PiecePacketMultiError) AllErrors() []error { return m }
-
 // PiecePacketValidationError is the validation error returned by
 // PiecePacket.Validate if the designated constraints aren't met.
 type PiecePacketValidationError struct {
diff --git a/pkg/rpc/cdnsystem/cdnsystem.pb.go b/pkg/rpc/cdnsystem/cdnsystem.pb.go
index 9ca68bda..5d1b32b9 100644
--- a/pkg/rpc/cdnsystem/cdnsystem.pb.go
+++ b/pkg/rpc/cdnsystem/cdnsystem.pb.go
@@ -15,7 +15,7 @@
 
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.26.0
+// 	protoc-gen-go v1.27.1
 // 	protoc        v3.17.3
 // source: pkg/rpc/cdnsystem/cdnsystem.proto
 
diff --git a/pkg/rpc/cdnsystem/cdnsystem.pb.validate.go b/pkg/rpc/cdnsystem/cdnsystem.pb.validate.go
index 9afd5a6a..7dddaf82 100644
--- a/pkg/rpc/cdnsystem/cdnsystem.pb.validate.go
+++ b/pkg/rpc/cdnsystem/cdnsystem.pb.validate.go
@@ -34,79 +34,34 @@ var (
 )
 
 // Validate checks the field values on SeedRequest with the rules defined in
-// the proto definition for this message. If any rules are violated, the first
-// error encountered is returned, or nil if there are no violations.
+// the proto definition for this message. If any rules are violated, an error
+// is returned.
 func (m *SeedRequest) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on SeedRequest with the rules defined in
-// the proto definition for this message. If any rules are violated, the
-// result is a list of violation errors wrapped in SeedRequestMultiError, or
-// nil if none found.
-func (m *SeedRequest) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *SeedRequest) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if utf8.RuneCountInString(m.GetTaskId()) < 1 {
-		err := SeedRequestValidationError{
+		return SeedRequestValidationError{
 			field:  "TaskId",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if uri, err := url.Parse(m.GetUrl()); err != nil {
-		err = SeedRequestValidationError{
+		return SeedRequestValidationError{
 			field:  "Url",
 			reason: "value must be a valid URI",
 			cause:  err,
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	} else if !uri.IsAbs() {
-		err := SeedRequestValidationError{
+		return SeedRequestValidationError{
 			field:  "Url",
 			reason: "value must be absolute",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
-	if all {
-		switch v := interface{}(m.GetUrlMeta()).(type) {
-		case interface{ ValidateAll() error }:
-			if err := v.ValidateAll(); err != nil {
-				errors = append(errors, SeedRequestValidationError{
-					field:  "UrlMeta",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		case interface{ Validate() error }:
-			if err := v.Validate(); err != nil {
-				errors = append(errors, SeedRequestValidationError{
-					field:  "UrlMeta",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		}
-	} else if v, ok := interface{}(m.GetUrlMeta()).(interface{ Validate() error }); ok {
+	if v, ok := interface{}(m.GetUrlMeta()).(interface{ Validate() error }); ok {
 		if err := v.Validate(); err != nil {
 			return SeedRequestValidationError{
 				field:  "UrlMeta",
@@ -116,28 +71,9 @@ func (m *SeedRequest) validate(all bool) error {
 		}
 	}
 
-	if len(errors) > 0 {
-		return SeedRequestMultiError(errors)
-	}
 	return nil
 }
 
-// SeedRequestMultiError is an error wrapping multiple validation errors
-// returned by SeedRequest.ValidateAll() if the designated constraints aren't met.
-type SeedRequestMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m SeedRequestMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m SeedRequestMultiError) AllErrors() []error { return m }
-
 // SeedRequestValidationError is the validation error returned by
 // SeedRequest.Validate if the designated constraints aren't met.
 type SeedRequestValidationError struct {
@@ -193,69 +129,27 @@ var _ interface {
 } = SeedRequestValidationError{}
 
 // Validate checks the field values on PieceSeed with the rules defined in the
-// proto definition for this message. If any rules are violated, the first
-// error encountered is returned, or nil if there are no violations.
+// proto definition for this message. If any rules are violated, an error is returned.
 func (m *PieceSeed) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on PieceSeed with the rules defined in
-// the proto definition for this message. If any rules are violated, the
-// result is a list of violation errors wrapped in PieceSeedMultiError, or nil
-// if none found.
-func (m *PieceSeed) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *PieceSeed) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if utf8.RuneCountInString(m.GetPeerId()) < 1 {
-		err := PieceSeedValidationError{
+		return PieceSeedValidationError{
 			field:  "PeerId",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if utf8.RuneCountInString(m.GetHostUuid()) < 1 {
-		err := PieceSeedValidationError{
+		return PieceSeedValidationError{
 			field:  "HostUuid",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
-	if all {
-		switch v := interface{}(m.GetPieceInfo()).(type) {
-		case interface{ ValidateAll() error }:
-			if err := v.ValidateAll(); err != nil {
-				errors = append(errors, PieceSeedValidationError{
-					field:  "PieceInfo",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		case interface{ Validate() error }:
-			if err := v.Validate(); err != nil {
-				errors = append(errors, PieceSeedValidationError{
-					field:  "PieceInfo",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		}
-	} else if v, ok := interface{}(m.GetPieceInfo()).(interface{ Validate() error }); ok {
+	if v, ok := interface{}(m.GetPieceInfo()).(interface{ Validate() error }); ok {
 		if err := v.Validate(); err != nil {
 			return PieceSeedValidationError{
 				field:  "PieceInfo",
@@ -271,28 +165,9 @@ func (m *PieceSeed) validate(all bool) error {
 
 	// no validation rules for TotalPieceCount
 
-	if len(errors) > 0 {
-		return PieceSeedMultiError(errors)
-	}
 	return nil
 }
 
-// PieceSeedMultiError is an error wrapping multiple validation errors returned
-// by PieceSeed.ValidateAll() if the designated constraints aren't met.
-type PieceSeedMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m PieceSeedMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m PieceSeedMultiError) AllErrors() []error { return m }
-
 // PieceSeedValidationError is the validation error returned by
 // PieceSeed.Validate if the designated constraints aren't met.
 type PieceSeedValidationError struct {
diff --git a/pkg/rpc/cdnsystem/cdnsystem_grpc.pb.go b/pkg/rpc/cdnsystem/cdnsystem_grpc.pb.go
index 7d512d66..515837aa 100644
--- a/pkg/rpc/cdnsystem/cdnsystem_grpc.pb.go
+++ b/pkg/rpc/cdnsystem/cdnsystem_grpc.pb.go
@@ -12,6 +12,7 @@ import (
 
 // This is a compile-time assertion to ensure that this generated file
 // is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
 const _ = grpc.SupportPackageIsVersion7
 
 // SeederClient is the client API for Seeder service.
@@ -33,7 +34,7 @@ func NewSeederClient(cc grpc.ClientConnInterface) SeederClient {
 }
 
 func (c *seederClient) ObtainSeeds(ctx context.Context, in *SeedRequest, opts ...grpc.CallOption) (Seeder_ObtainSeedsClient, error) {
-	stream, err := c.cc.NewStream(ctx, &_Seeder_serviceDesc.Streams[0], "/cdnsystem.Seeder/ObtainSeeds", opts...)
+	stream, err := c.cc.NewStream(ctx, &Seeder_ServiceDesc.Streams[0], "/cdnsystem.Seeder/ObtainSeeds", opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -104,7 +105,7 @@ type UnsafeSeederServer interface {
 }
 
 func RegisterSeederServer(s grpc.ServiceRegistrar, srv SeederServer) {
-	s.RegisterService(&_Seeder_serviceDesc, srv)
+	s.RegisterService(&Seeder_ServiceDesc, srv)
 }
 
 func _Seeder_ObtainSeeds_Handler(srv interface{}, stream grpc.ServerStream) error {
@@ -146,7 +147,10 @@ func _Seeder_GetPieceTasks_Handler(srv interface{}, ctx context.Context, dec fun
 	return interceptor(ctx, in, info, handler)
 }
 
-var _Seeder_serviceDesc = grpc.ServiceDesc{
+// Seeder_ServiceDesc is the grpc.ServiceDesc for Seeder service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var Seeder_ServiceDesc = grpc.ServiceDesc{
 	ServiceName: "cdnsystem.Seeder",
 	HandlerType: (*SeederServer)(nil),
 	Methods: []grpc.MethodDesc{
diff --git a/pkg/rpc/dfdaemon/dfdaemon.pb.go b/pkg/rpc/dfdaemon/dfdaemon.pb.go
index 53e08b59..567f8479 100644
--- a/pkg/rpc/dfdaemon/dfdaemon.pb.go
+++ b/pkg/rpc/dfdaemon/dfdaemon.pb.go
@@ -15,7 +15,7 @@
 
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.26.0
+// 	protoc-gen-go v1.27.1
 // 	protoc        v3.17.3
 // source: pkg/rpc/dfdaemon/dfdaemon.proto
 
diff --git a/pkg/rpc/dfdaemon/dfdaemon.pb.validate.go b/pkg/rpc/dfdaemon/dfdaemon.pb.validate.go
index c3290c02..e28b804a 100644
--- a/pkg/rpc/dfdaemon/dfdaemon.pb.validate.go
+++ b/pkg/rpc/dfdaemon/dfdaemon.pb.validate.go
@@ -37,115 +37,58 @@ var (
 var _dfdaemon_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
 
 // Validate checks the field values on DownRequest with the rules defined in
-// the proto definition for this message. If any rules are violated, the first
-// error encountered is returned, or nil if there are no violations.
+// the proto definition for this message. If any rules are violated, an error
+// is returned.
 func (m *DownRequest) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on DownRequest with the rules defined in
-// the proto definition for this message. If any rules are violated, the
-// result is a list of violation errors wrapped in DownRequestMultiError, or
-// nil if none found.
-func (m *DownRequest) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *DownRequest) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if err := m._validateUuid(m.GetUuid()); err != nil {
-		err = DownRequestValidationError{
+		return DownRequestValidationError{
 			field:  "Uuid",
 			reason: "value must be a valid UUID",
 			cause:  err,
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if uri, err := url.Parse(m.GetUrl()); err != nil {
-		err = DownRequestValidationError{
+		return DownRequestValidationError{
 			field:  "Url",
 			reason: "value must be a valid URI",
 			cause:  err,
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	} else if !uri.IsAbs() {
-		err := DownRequestValidationError{
+		return DownRequestValidationError{
 			field:  "Url",
 			reason: "value must be absolute",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if utf8.RuneCountInString(m.GetOutput()) < 1 {
-		err := DownRequestValidationError{
+		return DownRequestValidationError{
 			field:  "Output",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if m.GetTimeout() < 0 {
-		err := DownRequestValidationError{
+		return DownRequestValidationError{
 			field:  "Timeout",
 			reason: "value must be greater than or equal to 0",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if m.GetLimit() < 0 {
-		err := DownRequestValidationError{
+		return DownRequestValidationError{
 			field:  "Limit",
 			reason: "value must be greater than or equal to 0",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	// no validation rules for DisableBackSource
 
-	if all {
-		switch v := interface{}(m.GetUrlMeta()).(type) {
-		case interface{ ValidateAll() error }:
-			if err := v.ValidateAll(); err != nil {
-				errors = append(errors, DownRequestValidationError{
-					field:  "UrlMeta",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		case interface{ Validate() error }:
-			if err := v.Validate(); err != nil {
-				errors = append(errors, DownRequestValidationError{
-					field:  "UrlMeta",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		}
-	} else if v, ok := interface{}(m.GetUrlMeta()).(interface{ Validate() error }); ok {
+	if v, ok := interface{}(m.GetUrlMeta()).(interface{ Validate() error }); ok {
 		if err := v.Validate(); err != nil {
 			return DownRequestValidationError{
 				field:  "UrlMeta",
@@ -158,14 +101,10 @@ func (m *DownRequest) validate(all bool) error {
 	if m.GetPattern() != "" {
 
 		if _, ok := _DownRequest_Pattern_InLookup[m.GetPattern()]; !ok {
-			err := DownRequestValidationError{
+			return DownRequestValidationError{
 				field:  "Pattern",
 				reason: "value must be in list [p2p cdn source]",
 			}
-			if !all {
-				return err
-			}
-			errors = append(errors, err)
 		}
 
 	}
@@ -176,9 +115,6 @@ func (m *DownRequest) validate(all bool) error {
 
 	// no validation rules for Gid
 
-	if len(errors) > 0 {
-		return DownRequestMultiError(errors)
-	}
 	return nil
 }
 
@@ -190,22 +126,6 @@ func (m *DownRequest) _validateUuid(uuid string) error {
 	return nil
 }
 
-// DownRequestMultiError is an error wrapping multiple validation errors
-// returned by DownRequest.ValidateAll() if the designated constraints aren't met.
-type DownRequestMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m DownRequestMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m DownRequestMultiError) AllErrors() []error { return m }
-
 // DownRequestValidationError is the validation error returned by
 // DownRequest.Validate if the designated constraints aren't met.
 type DownRequestValidationError struct {
@@ -267,84 +187,38 @@ var _DownRequest_Pattern_InLookup = map[string]struct{}{
 }
 
 // Validate checks the field values on DownResult with the rules defined in the
-// proto definition for this message. If any rules are violated, the first
-// error encountered is returned, or nil if there are no violations.
+// proto definition for this message. If any rules are violated, an error is returned.
 func (m *DownResult) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on DownResult with the rules defined in
-// the proto definition for this message. If any rules are violated, the
-// result is a list of violation errors wrapped in DownResultMultiError, or
-// nil if none found.
-func (m *DownResult) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *DownResult) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if utf8.RuneCountInString(m.GetTaskId()) < 1 {
-		err := DownResultValidationError{
+		return DownResultValidationError{
 			field:  "TaskId",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if utf8.RuneCountInString(m.GetPeerId()) < 1 {
-		err := DownResultValidationError{
+		return DownResultValidationError{
 			field:  "PeerId",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if m.GetCompletedLength() < 0 {
-		err := DownResultValidationError{
+		return DownResultValidationError{
 			field:  "CompletedLength",
 			reason: "value must be greater than or equal to 0",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	// no validation rules for Done
 
-	if len(errors) > 0 {
-		return DownResultMultiError(errors)
-	}
 	return nil
 }
 
-// DownResultMultiError is an error wrapping multiple validation errors
-// returned by DownResult.ValidateAll() if the designated constraints aren't met.
-type DownResultMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m DownResultMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m DownResultMultiError) AllErrors() []error { return m }
-
 // DownResultValidationError is the validation error returned by
 // DownResult.Validate if the designated constraints aren't met.
 type DownResultValidationError struct {
diff --git a/pkg/rpc/dfdaemon/dfdaemon_grpc.pb.go b/pkg/rpc/dfdaemon/dfdaemon_grpc.pb.go
index 3a61dfe0..3307b9b3 100644
--- a/pkg/rpc/dfdaemon/dfdaemon_grpc.pb.go
+++ b/pkg/rpc/dfdaemon/dfdaemon_grpc.pb.go
@@ -13,6 +13,7 @@ import (
 
 // This is a compile-time assertion to ensure that this generated file
 // is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
 const _ = grpc.SupportPackageIsVersion7
 
 // DaemonClient is the client API for Daemon service.
@@ -36,7 +37,7 @@ func NewDaemonClient(cc grpc.ClientConnInterface) DaemonClient {
 }
 
 func (c *daemonClient) Download(ctx context.Context, in *DownRequest, opts ...grpc.CallOption) (Daemon_DownloadClient, error) {
-	stream, err := c.cc.NewStream(ctx, &_Daemon_serviceDesc.Streams[0], "/dfdaemon.Daemon/Download", opts...)
+	stream, err := c.cc.NewStream(ctx, &Daemon_ServiceDesc.Streams[0], "/dfdaemon.Daemon/Download", opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -121,7 +122,7 @@ type UnsafeDaemonServer interface {
 }
 
 func RegisterDaemonServer(s grpc.ServiceRegistrar, srv DaemonServer) {
-	s.RegisterService(&_Daemon_serviceDesc, srv)
+	s.RegisterService(&Daemon_ServiceDesc, srv)
 }
 
 func _Daemon_Download_Handler(srv interface{}, stream grpc.ServerStream) error {
@@ -181,7 +182,10 @@ func _Daemon_CheckHealth_Handler(srv interface{}, ctx context.Context, dec func(
 	return interceptor(ctx, in, info, handler)
 }
 
-var _Daemon_serviceDesc = grpc.ServiceDesc{
+// Daemon_ServiceDesc is the grpc.ServiceDesc for Daemon service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var Daemon_ServiceDesc = grpc.ServiceDesc{
 	ServiceName: "dfdaemon.Daemon",
 	HandlerType: (*DaemonServer)(nil),
 	Methods: []grpc.MethodDesc{
diff --git a/pkg/rpc/manager/manager.pb.go b/pkg/rpc/manager/manager.pb.go
index ed84a383..308af10a 100644
--- a/pkg/rpc/manager/manager.pb.go
+++ b/pkg/rpc/manager/manager.pb.go
@@ -15,7 +15,7 @@
 
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.26.0
+// 	protoc-gen-go v1.27.1
 // 	protoc        v3.17.3
 // source: pkg/rpc/manager/manager.proto
 
diff --git a/pkg/rpc/manager/manager.pb.validate.go b/pkg/rpc/manager/manager.pb.validate.go
index 47956fcc..c7005d72 100644
--- a/pkg/rpc/manager/manager.pb.validate.go
+++ b/pkg/rpc/manager/manager.pb.validate.go
@@ -34,27 +34,12 @@ var (
 )
 
 // Validate checks the field values on CDNCluster with the rules defined in the
-// proto definition for this message. If any rules are violated, the first
-// error encountered is returned, or nil if there are no violations.
+// proto definition for this message. If any rules are violated, an error is returned.
 func (m *CDNCluster) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on CDNCluster with the rules defined in
-// the proto definition for this message. If any rules are violated, the
-// result is a list of violation errors wrapped in CDNClusterMultiError, or
-// nil if none found.
-func (m *CDNCluster) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *CDNCluster) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	// no validation rules for Id
 
 	// no validation rules for Name
@@ -63,26 +48,7 @@ func (m *CDNCluster) validate(all bool) error {
 
 	// no validation rules for Config
 
-	if all {
-		switch v := interface{}(m.GetSecurityGroup()).(type) {
-		case interface{ ValidateAll() error }:
-			if err := v.ValidateAll(); err != nil {
-				errors = append(errors, CDNClusterValidationError{
-					field:  "SecurityGroup",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		case interface{ Validate() error }:
-			if err := v.Validate(); err != nil {
-				errors = append(errors, CDNClusterValidationError{
-					field:  "SecurityGroup",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		}
-	} else if v, ok := interface{}(m.GetSecurityGroup()).(interface{ Validate() error }); ok {
+	if v, ok := interface{}(m.GetSecurityGroup()).(interface{ Validate() error }); ok {
 		if err := v.Validate(); err != nil {
 			return CDNClusterValidationError{
 				field:  "SecurityGroup",
@@ -92,28 +58,9 @@ func (m *CDNCluster) validate(all bool) error {
 		}
 	}
 
-	if len(errors) > 0 {
-		return CDNClusterMultiError(errors)
-	}
 	return nil
 }
 
-// CDNClusterMultiError is an error wrapping multiple validation errors
-// returned by CDNCluster.ValidateAll() if the designated constraints aren't met.
-type CDNClusterMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m CDNClusterMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m CDNClusterMultiError) AllErrors() []error { return m }
-
 // CDNClusterValidationError is the validation error returned by
 // CDNCluster.Validate if the designated constraints aren't met.
 type CDNClusterValidationError struct {
@@ -169,27 +116,13 @@ var _ interface {
 } = CDNClusterValidationError{}
 
 // Validate checks the field values on SecurityGroup with the rules defined in
-// the proto definition for this message. If any rules are violated, the first
-// error encountered is returned, or nil if there are no violations.
+// the proto definition for this message. If any rules are violated, an error
+// is returned.
 func (m *SecurityGroup) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on SecurityGroup with the rules defined
-// in the proto definition for this message. If any rules are violated, the
-// result is a list of violation errors wrapped in SecurityGroupMultiError, or
-// nil if none found.
-func (m *SecurityGroup) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *SecurityGroup) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	// no validation rules for Id
 
 	// no validation rules for Name
@@ -200,29 +133,9 @@ func (m *SecurityGroup) validate(all bool) error {
 
 	// no validation rules for ProxyDomain
 
-	if len(errors) > 0 {
-		return SecurityGroupMultiError(errors)
-	}
 	return nil
 }
 
-// SecurityGroupMultiError is an error wrapping multiple validation errors
-// returned by SecurityGroup.ValidateAll() if the designated constraints
-// aren't met.
-type SecurityGroupMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m SecurityGroupMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m SecurityGroupMultiError) AllErrors() []error { return m }
-
 // SecurityGroupValidationError is the validation error returned by
 // SecurityGroup.Validate if the designated constraints aren't met.
 type SecurityGroupValidationError struct {
@@ -278,26 +191,12 @@ var _ interface {
 } = SecurityGroupValidationError{}
 
 // Validate checks the field values on CDN with the rules defined in the proto
-// definition for this message. If any rules are violated, the first error
-// encountered is returned, or nil if there are no violations.
+// definition for this message. If any rules are violated, an error is returned.
 func (m *CDN) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on CDN with the rules defined in the
-// proto definition for this message. If any rules are violated, the result is
-// a list of violation errors wrapped in CDNMultiError, or nil if none found.
-func (m *CDN) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *CDN) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	// no validation rules for Id
 
 	// no validation rules for HostName
@@ -316,26 +215,7 @@ func (m *CDN) validate(all bool) error {
 
 	// no validation rules for CdnClusterId
 
-	if all {
-		switch v := interface{}(m.GetCdnCluster()).(type) {
-		case interface{ ValidateAll() error }:
-			if err := v.ValidateAll(); err != nil {
-				errors = append(errors, CDNValidationError{
-					field:  "CdnCluster",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		case interface{ Validate() error }:
-			if err := v.Validate(); err != nil {
-				errors = append(errors, CDNValidationError{
-					field:  "CdnCluster",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		}
-	} else if v, ok := interface{}(m.GetCdnCluster()).(interface{ Validate() error }); ok {
+	if v, ok := interface{}(m.GetCdnCluster()).(interface{ Validate() error }); ok {
 		if err := v.Validate(); err != nil {
 			return CDNValidationError{
 				field:  "CdnCluster",
@@ -345,28 +225,9 @@ func (m *CDN) validate(all bool) error {
 		}
 	}
 
-	if len(errors) > 0 {
-		return CDNMultiError(errors)
-	}
 	return nil
 }
 
-// CDNMultiError is an error wrapping multiple validation errors returned by
-// CDN.ValidateAll() if the designated constraints aren't met.
-type CDNMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m CDNMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m CDNMultiError) AllErrors() []error { return m }
-
 // CDNValidationError is the validation error returned by CDN.Validate if the
 // designated constraints aren't met.
 type CDNValidationError struct {
@@ -422,64 +283,35 @@ var _ interface {
 } = CDNValidationError{}
 
 // Validate checks the field values on GetCDNRequest with the rules defined in
-// the proto definition for this message. If any rules are violated, the first
-// error encountered is returned, or nil if there are no violations.
+// the proto definition for this message. If any rules are violated, an error
+// is returned.
 func (m *GetCDNRequest) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on GetCDNRequest with the rules defined
-// in the proto definition for this message. If any rules are violated, the
-// result is a list of violation errors wrapped in GetCDNRequestMultiError, or
-// nil if none found.
-func (m *GetCDNRequest) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *GetCDNRequest) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if _, ok := SourceType_name[int32(m.GetSourceType())]; !ok {
-		err := GetCDNRequestValidationError{
+		return GetCDNRequestValidationError{
 			field:  "SourceType",
 			reason: "value must be one of the defined enum values",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if err := m._validateHostname(m.GetHostName()); err != nil {
-		err = GetCDNRequestValidationError{
+		return GetCDNRequestValidationError{
 			field:  "HostName",
 			reason: "value must be a valid hostname",
 			cause:  err,
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if m.GetCdnClusterId() < 1 {
-		err := GetCDNRequestValidationError{
+		return GetCDNRequestValidationError{
 			field:  "CdnClusterId",
 			reason: "value must be greater than or equal to 1",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
-	if len(errors) > 0 {
-		return GetCDNRequestMultiError(errors)
-	}
 	return nil
 }
 
@@ -513,23 +345,6 @@ func (m *GetCDNRequest) _validateHostname(host string) error {
 	return nil
 }
 
-// GetCDNRequestMultiError is an error wrapping multiple validation errors
-// returned by GetCDNRequest.ValidateAll() if the designated constraints
-// aren't met.
-type GetCDNRequestMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m GetCDNRequestMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m GetCDNRequestMultiError) AllErrors() []error { return m }
-
 // GetCDNRequestValidationError is the validation error returned by
 // GetCDNRequest.Validate if the designated constraints aren't met.
 type GetCDNRequestValidationError struct {
@@ -585,61 +400,35 @@ var _ interface {
 } = GetCDNRequestValidationError{}
 
 // Validate checks the field values on UpdateCDNRequest with the rules defined
-// in the proto definition for this message. If any rules are violated, the
-// first error encountered is returned, or nil if there are no violations.
+// in the proto definition for this message. If any rules are violated, an
+// error is returned.
 func (m *UpdateCDNRequest) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on UpdateCDNRequest with the rules
-// defined in the proto definition for this message. If any rules are
-// violated, the result is a list of violation errors wrapped in
-// UpdateCDNRequestMultiError, or nil if none found.
-func (m *UpdateCDNRequest) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *UpdateCDNRequest) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if _, ok := SourceType_name[int32(m.GetSourceType())]; !ok {
-		err := UpdateCDNRequestValidationError{
+		return UpdateCDNRequestValidationError{
 			field:  "SourceType",
 			reason: "value must be one of the defined enum values",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if err := m._validateHostname(m.GetHostName()); err != nil {
-		err = UpdateCDNRequestValidationError{
+		return UpdateCDNRequestValidationError{
 			field:  "HostName",
 			reason: "value must be a valid hostname",
 			cause:  err,
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if m.GetIdc() != "" {
 
 		if l := utf8.RuneCountInString(m.GetIdc()); l < 1 || l > 1024 {
-			err := UpdateCDNRequestValidationError{
+			return UpdateCDNRequestValidationError{
 				field:  "Idc",
 				reason: "value length must be between 1 and 1024 runes, inclusive",
 			}
-			if !all {
-				return err
-			}
-			errors = append(errors, err)
 		}
 
 	}
@@ -647,65 +436,42 @@ func (m *UpdateCDNRequest) validate(all bool) error {
 	if m.GetLocation() != "" {
 
 		if utf8.RuneCountInString(m.GetLocation()) > 1024 {
-			err := UpdateCDNRequestValidationError{
+			return UpdateCDNRequestValidationError{
 				field:  "Location",
 				reason: "value length must be at most 1024 runes",
 			}
-			if !all {
-				return err
-			}
-			errors = append(errors, err)
 		}
 
 	}
 
 	if ip := net.ParseIP(m.GetIp()); ip == nil {
-		err := UpdateCDNRequestValidationError{
+		return UpdateCDNRequestValidationError{
 			field:  "Ip",
 			reason: "value must be a valid IP address",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if val := m.GetPort(); val < 1024 || val >= 65535 {
-		err := UpdateCDNRequestValidationError{
+		return UpdateCDNRequestValidationError{
 			field:  "Port",
 			reason: "value must be inside range [1024, 65535)",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if val := m.GetDownloadPort(); val < 1024 || val >= 65535 {
-		err := UpdateCDNRequestValidationError{
+		return UpdateCDNRequestValidationError{
 			field:  "DownloadPort",
 			reason: "value must be inside range [1024, 65535)",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if m.GetCdnClusterId() < 1 {
-		err := UpdateCDNRequestValidationError{
+		return UpdateCDNRequestValidationError{
 			field:  "CdnClusterId",
 			reason: "value must be greater than or equal to 1",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
-	if len(errors) > 0 {
-		return UpdateCDNRequestMultiError(errors)
-	}
 	return nil
 }
 
@@ -739,23 +505,6 @@ func (m *UpdateCDNRequest) _validateHostname(host string) error {
 	return nil
 }
 
-// UpdateCDNRequestMultiError is an error wrapping multiple validation errors
-// returned by UpdateCDNRequest.ValidateAll() if the designated constraints
-// aren't met.
-type UpdateCDNRequestMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m UpdateCDNRequestMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m UpdateCDNRequestMultiError) AllErrors() []error { return m }
-
 // UpdateCDNRequestValidationError is the validation error returned by
 // UpdateCDNRequest.Validate if the designated constraints aren't met.
 type UpdateCDNRequestValidationError struct {
@@ -811,27 +560,13 @@ var _ interface {
 } = UpdateCDNRequestValidationError{}
 
 // Validate checks the field values on SchedulerCluster with the rules defined
-// in the proto definition for this message. If any rules are violated, the
-// first error encountered is returned, or nil if there are no violations.
+// in the proto definition for this message. If any rules are violated, an
+// error is returned.
 func (m *SchedulerCluster) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on SchedulerCluster with the rules
-// defined in the proto definition for this message. If any rules are
-// violated, the result is a list of violation errors wrapped in
-// SchedulerClusterMultiError, or nil if none found.
-func (m *SchedulerCluster) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *SchedulerCluster) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	// no validation rules for Id
 
 	// no validation rules for Name
@@ -842,26 +577,7 @@ func (m *SchedulerCluster) validate(all bool) error {
 
 	// no validation rules for ClientConfig
 
-	if all {
-		switch v := interface{}(m.GetSecurityGroup()).(type) {
-		case interface{ ValidateAll() error }:
-			if err := v.ValidateAll(); err != nil {
-				errors = append(errors, SchedulerClusterValidationError{
-					field:  "SecurityGroup",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		case interface{ Validate() error }:
-			if err := v.Validate(); err != nil {
-				errors = append(errors, SchedulerClusterValidationError{
-					field:  "SecurityGroup",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		}
-	} else if v, ok := interface{}(m.GetSecurityGroup()).(interface{ Validate() error }); ok {
+	if v, ok := interface{}(m.GetSecurityGroup()).(interface{ Validate() error }); ok {
 		if err := v.Validate(); err != nil {
 			return SchedulerClusterValidationError{
 				field:  "SecurityGroup",
@@ -871,29 +587,9 @@ func (m *SchedulerCluster) validate(all bool) error {
 		}
 	}
 
-	if len(errors) > 0 {
-		return SchedulerClusterMultiError(errors)
-	}
 	return nil
 }
 
-// SchedulerClusterMultiError is an error wrapping multiple validation errors
-// returned by SchedulerCluster.ValidateAll() if the designated constraints
-// aren't met.
-type SchedulerClusterMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m SchedulerClusterMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m SchedulerClusterMultiError) AllErrors() []error { return m }
-
 // SchedulerClusterValidationError is the validation error returned by
 // SchedulerCluster.Validate if the designated constraints aren't met.
 type SchedulerClusterValidationError struct {
@@ -949,27 +645,12 @@ var _ interface {
 } = SchedulerClusterValidationError{}
 
 // Validate checks the field values on Scheduler with the rules defined in the
-// proto definition for this message. If any rules are violated, the first
-// error encountered is returned, or nil if there are no violations.
+// proto definition for this message. If any rules are violated, an error is returned.
 func (m *Scheduler) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on Scheduler with the rules defined in
-// the proto definition for this message. If any rules are violated, the
-// result is a list of violation errors wrapped in SchedulerMultiError, or nil
-// if none found.
-func (m *Scheduler) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *Scheduler) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	// no validation rules for Id
 
 	// no validation rules for HostName
@@ -990,26 +671,7 @@ func (m *Scheduler) validate(all bool) error {
 
 	// no validation rules for SchedulerClusterId
 
-	if all {
-		switch v := interface{}(m.GetSchedulerCluster()).(type) {
-		case interface{ ValidateAll() error }:
-			if err := v.ValidateAll(); err != nil {
-				errors = append(errors, SchedulerValidationError{
-					field:  "SchedulerCluster",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		case interface{ Validate() error }:
-			if err := v.Validate(); err != nil {
-				errors = append(errors, SchedulerValidationError{
-					field:  "SchedulerCluster",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		}
-	} else if v, ok := interface{}(m.GetSchedulerCluster()).(interface{ Validate() error }); ok {
+	if v, ok := interface{}(m.GetSchedulerCluster()).(interface{ Validate() error }); ok {
 		if err := v.Validate(); err != nil {
 			return SchedulerValidationError{
 				field:  "SchedulerCluster",
@@ -1022,26 +684,7 @@ func (m *Scheduler) validate(all bool) error {
 	for idx, item := range m.GetCdns() {
 		_, _ = idx, item
 
-		if all {
-			switch v := interface{}(item).(type) {
-			case interface{ ValidateAll() error }:
-				if err := v.ValidateAll(); err != nil {
-					errors = append(errors, SchedulerValidationError{
-						field:  fmt.Sprintf("Cdns[%v]", idx),
-						reason: "embedded message failed validation",
-						cause:  err,
-					})
-				}
-			case interface{ Validate() error }:
-				if err := v.Validate(); err != nil {
-					errors = append(errors, SchedulerValidationError{
-						field:  fmt.Sprintf("Cdns[%v]", idx),
-						reason: "embedded message failed validation",
-						cause:  err,
-					})
-				}
-			}
-		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
 			if err := v.Validate(); err != nil {
 				return SchedulerValidationError{
 					field:  fmt.Sprintf("Cdns[%v]", idx),
@@ -1053,28 +696,9 @@ func (m *Scheduler) validate(all bool) error {
 
 	}
 
-	if len(errors) > 0 {
-		return SchedulerMultiError(errors)
-	}
 	return nil
 }
 
-// SchedulerMultiError is an error wrapping multiple validation errors returned
-// by Scheduler.ValidateAll() if the designated constraints aren't met.
-type SchedulerMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m SchedulerMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m SchedulerMultiError) AllErrors() []error { return m }
-
 // SchedulerValidationError is the validation error returned by
 // Scheduler.Validate if the designated constraints aren't met.
 type SchedulerValidationError struct {
@@ -1131,63 +755,34 @@ var _ interface {
 
 // Validate checks the field values on GetSchedulerRequest with the rules
 // defined in the proto definition for this message. If any rules are
-// violated, the first error encountered is returned, or nil if there are no violations.
+// violated, an error is returned.
 func (m *GetSchedulerRequest) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on GetSchedulerRequest with the rules
-// defined in the proto definition for this message. If any rules are
-// violated, the result is a list of violation errors wrapped in
-// GetSchedulerRequestMultiError, or nil if none found.
-func (m *GetSchedulerRequest) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *GetSchedulerRequest) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if _, ok := SourceType_name[int32(m.GetSourceType())]; !ok {
-		err := GetSchedulerRequestValidationError{
+		return GetSchedulerRequestValidationError{
 			field:  "SourceType",
 			reason: "value must be one of the defined enum values",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if err := m._validateHostname(m.GetHostName()); err != nil {
-		err = GetSchedulerRequestValidationError{
+		return GetSchedulerRequestValidationError{
 			field:  "HostName",
 			reason: "value must be a valid hostname",
 			cause:  err,
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if m.GetSchedulerClusterId() < 1 {
-		err := GetSchedulerRequestValidationError{
+		return GetSchedulerRequestValidationError{
 			field:  "SchedulerClusterId",
 			reason: "value must be greater than or equal to 1",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
-	if len(errors) > 0 {
-		return GetSchedulerRequestMultiError(errors)
-	}
 	return nil
 }
 
@@ -1221,23 +816,6 @@ func (m *GetSchedulerRequest) _validateHostname(host string) error {
 	return nil
 }
 
-// GetSchedulerRequestMultiError is an error wrapping multiple validation
-// errors returned by GetSchedulerRequest.ValidateAll() if the designated
-// constraints aren't met.
-type GetSchedulerRequestMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m GetSchedulerRequestMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m GetSchedulerRequestMultiError) AllErrors() []error { return m }
-
 // GetSchedulerRequestValidationError is the validation error returned by
 // GetSchedulerRequest.Validate if the designated constraints aren't met.
 type GetSchedulerRequestValidationError struct {
@@ -1296,60 +874,34 @@ var _ interface {
 
 // Validate checks the field values on UpdateSchedulerRequest with the rules
 // defined in the proto definition for this message. If any rules are
-// violated, the first error encountered is returned, or nil if there are no violations.
+// violated, an error is returned.
 func (m *UpdateSchedulerRequest) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on UpdateSchedulerRequest with the rules
-// defined in the proto definition for this message. If any rules are
-// violated, the result is a list of violation errors wrapped in
-// UpdateSchedulerRequestMultiError, or nil if none found.
-func (m *UpdateSchedulerRequest) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *UpdateSchedulerRequest) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if _, ok := SourceType_name[int32(m.GetSourceType())]; !ok {
-		err := UpdateSchedulerRequestValidationError{
+		return UpdateSchedulerRequestValidationError{
 			field:  "SourceType",
 			reason: "value must be one of the defined enum values",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if err := m._validateHostname(m.GetHostName()); err != nil {
-		err = UpdateSchedulerRequestValidationError{
+		return UpdateSchedulerRequestValidationError{
 			field:  "HostName",
 			reason: "value must be a valid hostname",
 			cause:  err,
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if m.GetVips() != "" {
 
 		if l := utf8.RuneCountInString(m.GetVips()); l < 1 || l > 1024 {
-			err := UpdateSchedulerRequestValidationError{
+			return UpdateSchedulerRequestValidationError{
 				field:  "Vips",
 				reason: "value length must be between 1 and 1024 runes, inclusive",
 			}
-			if !all {
-				return err
-			}
-			errors = append(errors, err)
 		}
 
 	}
@@ -1357,14 +909,10 @@ func (m *UpdateSchedulerRequest) validate(all bool) error {
 	if m.GetIdc() != "" {
 
 		if l := utf8.RuneCountInString(m.GetIdc()); l < 1 || l > 1024 {
-			err := UpdateSchedulerRequestValidationError{
+			return UpdateSchedulerRequestValidationError{
 				field:  "Idc",
 				reason: "value length must be between 1 and 1024 runes, inclusive",
 			}
-			if !all {
-				return err
-			}
-			errors = append(errors, err)
 		}
 
 	}
@@ -1372,14 +920,10 @@ func (m *UpdateSchedulerRequest) validate(all bool) error {
 	if m.GetLocation() != "" {
 
 		if utf8.RuneCountInString(m.GetLocation()) > 1024 {
-			err := UpdateSchedulerRequestValidationError{
+			return UpdateSchedulerRequestValidationError{
 				field:  "Location",
 				reason: "value length must be at most 1024 runes",
 			}
-			if !all {
-				return err
-			}
-			errors = append(errors, err)
 		}
 
 	}
@@ -1387,54 +931,35 @@ func (m *UpdateSchedulerRequest) validate(all bool) error {
 	if len(m.GetNetConfig()) > 0 {
 
 		if len(m.GetNetConfig()) < 1 {
-			err := UpdateSchedulerRequestValidationError{
+			return UpdateSchedulerRequestValidationError{
 				field:  "NetConfig",
 				reason: "value length must be at least 1 bytes",
 			}
-			if !all {
-				return err
-			}
-			errors = append(errors, err)
 		}
 
 	}
 
 	if ip := net.ParseIP(m.GetIp()); ip == nil {
-		err := UpdateSchedulerRequestValidationError{
+		return UpdateSchedulerRequestValidationError{
 			field:  "Ip",
 			reason: "value must be a valid IP address",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if val := m.GetPort(); val < 1024 || val >= 65535 {
-		err := UpdateSchedulerRequestValidationError{
+		return UpdateSchedulerRequestValidationError{
 			field:  "Port",
 			reason: "value must be inside range [1024, 65535)",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if m.GetSchedulerClusterId() < 1 {
-		err := UpdateSchedulerRequestValidationError{
+		return UpdateSchedulerRequestValidationError{
 			field:  "SchedulerClusterId",
 			reason: "value must be greater than or equal to 1",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
-	if len(errors) > 0 {
-		return UpdateSchedulerRequestMultiError(errors)
-	}
 	return nil
 }
 
@@ -1468,23 +993,6 @@ func (m *UpdateSchedulerRequest) _validateHostname(host string) error {
 	return nil
 }
 
-// UpdateSchedulerRequestMultiError is an error wrapping multiple validation
-// errors returned by UpdateSchedulerRequest.ValidateAll() if the designated
-// constraints aren't met.
-type UpdateSchedulerRequestMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m UpdateSchedulerRequestMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m UpdateSchedulerRequestMultiError) AllErrors() []error { return m }
-
 // UpdateSchedulerRequestValidationError is the validation error returned by
 // UpdateSchedulerRequest.Validate if the designated constraints aren't met.
 type UpdateSchedulerRequestValidationError struct {
@@ -1543,67 +1051,38 @@ var _ interface {
 
 // Validate checks the field values on ListSchedulersRequest with the rules
 // defined in the proto definition for this message. If any rules are
-// violated, the first error encountered is returned, or nil if there are no violations.
+// violated, an error is returned.
 func (m *ListSchedulersRequest) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on ListSchedulersRequest with the rules
-// defined in the proto definition for this message. If any rules are
-// violated, the result is a list of violation errors wrapped in
-// ListSchedulersRequestMultiError, or nil if none found.
-func (m *ListSchedulersRequest) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *ListSchedulersRequest) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if _, ok := SourceType_name[int32(m.GetSourceType())]; !ok {
-		err := ListSchedulersRequestValidationError{
+		return ListSchedulersRequestValidationError{
 			field:  "SourceType",
 			reason: "value must be one of the defined enum values",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if err := m._validateHostname(m.GetHostName()); err != nil {
-		err = ListSchedulersRequestValidationError{
+		return ListSchedulersRequestValidationError{
 			field:  "HostName",
 			reason: "value must be a valid hostname",
 			cause:  err,
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if ip := net.ParseIP(m.GetIp()); ip == nil {
-		err := ListSchedulersRequestValidationError{
+		return ListSchedulersRequestValidationError{
 			field:  "Ip",
 			reason: "value must be a valid IP address",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if len(m.GetHostInfo()) > 0 {
 
 	}
 
-	if len(errors) > 0 {
-		return ListSchedulersRequestMultiError(errors)
-	}
 	return nil
 }
 
@@ -1637,23 +1116,6 @@ func (m *ListSchedulersRequest) _validateHostname(host string) error {
 	return nil
 }
 
-// ListSchedulersRequestMultiError is an error wrapping multiple validation
-// errors returned by ListSchedulersRequest.ValidateAll() if the designated
-// constraints aren't met.
-type ListSchedulersRequestMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m ListSchedulersRequestMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m ListSchedulersRequestMultiError) AllErrors() []error { return m }
-
 // ListSchedulersRequestValidationError is the validation error returned by
 // ListSchedulersRequest.Validate if the designated constraints aren't met.
 type ListSchedulersRequestValidationError struct {
@@ -1712,49 +1174,16 @@ var _ interface {
 
 // Validate checks the field values on ListSchedulersResponse with the rules
 // defined in the proto definition for this message. If any rules are
-// violated, the first error encountered is returned, or nil if there are no violations.
+// violated, an error is returned.
 func (m *ListSchedulersResponse) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on ListSchedulersResponse with the rules
-// defined in the proto definition for this message. If any rules are
-// violated, the result is a list of violation errors wrapped in
-// ListSchedulersResponseMultiError, or nil if none found.
-func (m *ListSchedulersResponse) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *ListSchedulersResponse) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	for idx, item := range m.GetSchedulers() {
 		_, _ = idx, item
 
-		if all {
-			switch v := interface{}(item).(type) {
-			case interface{ ValidateAll() error }:
-				if err := v.ValidateAll(); err != nil {
-					errors = append(errors, ListSchedulersResponseValidationError{
-						field:  fmt.Sprintf("Schedulers[%v]", idx),
-						reason: "embedded message failed validation",
-						cause:  err,
-					})
-				}
-			case interface{ Validate() error }:
-				if err := v.Validate(); err != nil {
-					errors = append(errors, ListSchedulersResponseValidationError{
-						field:  fmt.Sprintf("Schedulers[%v]", idx),
-						reason: "embedded message failed validation",
-						cause:  err,
-					})
-				}
-			}
-		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
 			if err := v.Validate(); err != nil {
 				return ListSchedulersResponseValidationError{
 					field:  fmt.Sprintf("Schedulers[%v]", idx),
@@ -1766,29 +1195,9 @@ func (m *ListSchedulersResponse) validate(all bool) error {
 
 	}
 
-	if len(errors) > 0 {
-		return ListSchedulersResponseMultiError(errors)
-	}
 	return nil
 }
 
-// ListSchedulersResponseMultiError is an error wrapping multiple validation
-// errors returned by ListSchedulersResponse.ValidateAll() if the designated
-// constraints aren't met.
-type ListSchedulersResponseMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m ListSchedulersResponseMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m ListSchedulersResponseMultiError) AllErrors() []error { return m }
-
 // ListSchedulersResponseValidationError is the validation error returned by
 // ListSchedulersResponse.Validate if the designated constraints aren't met.
 type ListSchedulersResponseValidationError struct {
@@ -1846,64 +1255,35 @@ var _ interface {
 } = ListSchedulersResponseValidationError{}
 
 // Validate checks the field values on KeepAliveRequest with the rules defined
-// in the proto definition for this message. If any rules are violated, the
-// first error encountered is returned, or nil if there are no violations.
+// in the proto definition for this message. If any rules are violated, an
+// error is returned.
 func (m *KeepAliveRequest) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on KeepAliveRequest with the rules
-// defined in the proto definition for this message. If any rules are
-// violated, the result is a list of violation errors wrapped in
-// KeepAliveRequestMultiError, or nil if none found.
-func (m *KeepAliveRequest) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *KeepAliveRequest) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if _, ok := SourceType_name[int32(m.GetSourceType())]; !ok {
-		err := KeepAliveRequestValidationError{
+		return KeepAliveRequestValidationError{
 			field:  "SourceType",
 			reason: "value must be one of the defined enum values",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if err := m._validateHostname(m.GetHostName()); err != nil {
-		err = KeepAliveRequestValidationError{
+		return KeepAliveRequestValidationError{
 			field:  "HostName",
 			reason: "value must be a valid hostname",
 			cause:  err,
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if m.GetClusterId() < 1 {
-		err := KeepAliveRequestValidationError{
+		return KeepAliveRequestValidationError{
 			field:  "ClusterId",
 			reason: "value must be greater than or equal to 1",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
-	if len(errors) > 0 {
-		return KeepAliveRequestMultiError(errors)
-	}
 	return nil
 }
 
@@ -1937,23 +1317,6 @@ func (m *KeepAliveRequest) _validateHostname(host string) error {
 	return nil
 }
 
-// KeepAliveRequestMultiError is an error wrapping multiple validation errors
-// returned by KeepAliveRequest.ValidateAll() if the designated constraints
-// aren't met.
-type KeepAliveRequestMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m KeepAliveRequestMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m KeepAliveRequestMultiError) AllErrors() []error { return m }
-
 // KeepAliveRequestValidationError is the validation error returned by
 // KeepAliveRequest.Validate if the designated constraints aren't met.
 type KeepAliveRequestValidationError struct {
diff --git a/pkg/rpc/manager/manager_grpc.pb.go b/pkg/rpc/manager/manager_grpc.pb.go
index 0f9f3d52..4024ff24 100644
--- a/pkg/rpc/manager/manager_grpc.pb.go
+++ b/pkg/rpc/manager/manager_grpc.pb.go
@@ -12,6 +12,7 @@ import (
 
 // This is a compile-time assertion to ensure that this generated file
 // is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
 const _ = grpc.SupportPackageIsVersion7
 
 // ManagerClient is the client API for Manager service.
@@ -86,7 +87,7 @@ func (c *managerClient) ListSchedulers(ctx context.Context, in *ListSchedulersRe
 }
 
 func (c *managerClient) KeepAlive(ctx context.Context, opts ...grpc.CallOption) (Manager_KeepAliveClient, error) {
-	stream, err := c.cc.NewStream(ctx, &_Manager_serviceDesc.Streams[0], "/manager.Manager/KeepAlive", opts...)
+	stream, err := c.cc.NewStream(ctx, &Manager_ServiceDesc.Streams[0], "/manager.Manager/KeepAlive", opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -170,7 +171,7 @@ type UnsafeManagerServer interface {
 }
 
 func RegisterManagerServer(s grpc.ServiceRegistrar, srv ManagerServer) {
-	s.RegisterService(&_Manager_serviceDesc, srv)
+	s.RegisterService(&Manager_ServiceDesc, srv)
 }
 
 func _Manager_GetCDN_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
@@ -289,7 +290,10 @@ func (x *managerKeepAliveServer) Recv() (*KeepAliveRequest, error) {
 	return m, nil
 }
 
-var _Manager_serviceDesc = grpc.ServiceDesc{
+// Manager_ServiceDesc is the grpc.ServiceDesc for Manager service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var Manager_ServiceDesc = grpc.ServiceDesc{
 	ServiceName: "manager.Manager",
 	HandlerType: (*ManagerServer)(nil),
 	Methods: []grpc.MethodDesc{
diff --git a/pkg/rpc/scheduler/scheduler.pb.go b/pkg/rpc/scheduler/scheduler.pb.go
index 7974d15d..9f7f1df0 100644
--- a/pkg/rpc/scheduler/scheduler.pb.go
+++ b/pkg/rpc/scheduler/scheduler.pb.go
@@ -15,7 +15,7 @@
 
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.26.0
+// 	protoc-gen-go v1.27.1
 // 	protoc        v3.17.3
 // source: pkg/rpc/scheduler/scheduler.proto
 
@@ -191,7 +191,7 @@ func (x *RegisterResult) GetSizeScope() base.SizeScope {
 	if x != nil {
 		return x.SizeScope
 	}
-	return base.SizeScope_NORMAL
+	return base.SizeScope(0)
 }
 
 func (m *RegisterResult) GetDirectPiece() isRegisterResult_DirectPiece {
@@ -531,7 +531,7 @@ func (x *PieceResult) GetCode() base.Code {
 	if x != nil {
 		return x.Code
 	}
-	return base.Code_X_UNSPECIFIED
+	return base.Code(0)
 }
 
 func (x *PieceResult) GetHostLoad() *base.HostLoad {
@@ -635,7 +635,7 @@ func (x *PeerPacket) GetCode() base.Code {
 	if x != nil {
 		return x.Code
 	}
-	return base.Code_X_UNSPECIFIED
+	return base.Code(0)
 }
 
 type PeerResult struct {
@@ -769,7 +769,7 @@ func (x *PeerResult) GetCode() base.Code {
 	if x != nil {
 		return x.Code
 	}
-	return base.Code_X_UNSPECIFIED
+	return base.Code(0)
 }
 
 func (x *PeerResult) GetTotalPieceCount() int32 {
diff --git a/pkg/rpc/scheduler/scheduler.pb.validate.go b/pkg/rpc/scheduler/scheduler.pb.validate.go
index f2258351..46fa68ec 100644
--- a/pkg/rpc/scheduler/scheduler.pb.validate.go
+++ b/pkg/rpc/scheduler/scheduler.pb.validate.go
@@ -47,68 +47,27 @@ var (
 var _scheduler_uuidPattern = regexp.MustCompile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$")
 
 // Validate checks the field values on PeerTaskRequest with the rules defined
-// in the proto definition for this message. If any rules are violated, the
-// first error encountered is returned, or nil if there are no violations.
+// in the proto definition for this message. If any rules are violated, an
+// error is returned.
 func (m *PeerTaskRequest) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on PeerTaskRequest with the rules
-// defined in the proto definition for this message. If any rules are
-// violated, the result is a list of violation errors wrapped in
-// PeerTaskRequestMultiError, or nil if none found.
-func (m *PeerTaskRequest) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *PeerTaskRequest) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if uri, err := url.Parse(m.GetUrl()); err != nil {
-		err = PeerTaskRequestValidationError{
+		return PeerTaskRequestValidationError{
 			field:  "Url",
 			reason: "value must be a valid URI",
 			cause:  err,
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	} else if !uri.IsAbs() {
-		err := PeerTaskRequestValidationError{
+		return PeerTaskRequestValidationError{
 			field:  "Url",
 			reason: "value must be absolute",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
-	if all {
-		switch v := interface{}(m.GetUrlMeta()).(type) {
-		case interface{ ValidateAll() error }:
-			if err := v.ValidateAll(); err != nil {
-				errors = append(errors, PeerTaskRequestValidationError{
-					field:  "UrlMeta",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		case interface{ Validate() error }:
-			if err := v.Validate(); err != nil {
-				errors = append(errors, PeerTaskRequestValidationError{
-					field:  "UrlMeta",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		}
-	} else if v, ok := interface{}(m.GetUrlMeta()).(interface{ Validate() error }); ok {
+	if v, ok := interface{}(m.GetUrlMeta()).(interface{ Validate() error }); ok {
 		if err := v.Validate(); err != nil {
 			return PeerTaskRequestValidationError{
 				field:  "UrlMeta",
@@ -119,36 +78,13 @@ func (m *PeerTaskRequest) validate(all bool) error {
 	}
 
 	if utf8.RuneCountInString(m.GetPeerId()) < 1 {
-		err := PeerTaskRequestValidationError{
+		return PeerTaskRequestValidationError{
 			field:  "PeerId",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
-	if all {
-		switch v := interface{}(m.GetPeerHost()).(type) {
-		case interface{ ValidateAll() error }:
-			if err := v.ValidateAll(); err != nil {
-				errors = append(errors, PeerTaskRequestValidationError{
-					field:  "PeerHost",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		case interface{ Validate() error }:
-			if err := v.Validate(); err != nil {
-				errors = append(errors, PeerTaskRequestValidationError{
-					field:  "PeerHost",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		}
-	} else if v, ok := interface{}(m.GetPeerHost()).(interface{ Validate() error }); ok {
+	if v, ok := interface{}(m.GetPeerHost()).(interface{ Validate() error }); ok {
 		if err := v.Validate(); err != nil {
 			return PeerTaskRequestValidationError{
 				field:  "PeerHost",
@@ -158,26 +94,7 @@ func (m *PeerTaskRequest) validate(all bool) error {
 		}
 	}
 
-	if all {
-		switch v := interface{}(m.GetHostLoad()).(type) {
-		case interface{ ValidateAll() error }:
-			if err := v.ValidateAll(); err != nil {
-				errors = append(errors, PeerTaskRequestValidationError{
-					field:  "HostLoad",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		case interface{ Validate() error }:
-			if err := v.Validate(); err != nil {
-				errors = append(errors, PeerTaskRequestValidationError{
-					field:  "HostLoad",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		}
-	} else if v, ok := interface{}(m.GetHostLoad()).(interface{ Validate() error }); ok {
+	if v, ok := interface{}(m.GetHostLoad()).(interface{ Validate() error }); ok {
 		if err := v.Validate(); err != nil {
 			return PeerTaskRequestValidationError{
 				field:  "HostLoad",
@@ -189,29 +106,9 @@ func (m *PeerTaskRequest) validate(all bool) error {
 
 	// no validation rules for IsMigrating
 
-	if len(errors) > 0 {
-		return PeerTaskRequestMultiError(errors)
-	}
 	return nil
 }
 
-// PeerTaskRequestMultiError is an error wrapping multiple validation errors
-// returned by PeerTaskRequest.ValidateAll() if the designated constraints
-// aren't met.
-type PeerTaskRequestMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m PeerTaskRequestMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m PeerTaskRequestMultiError) AllErrors() []error { return m }
-
 // PeerTaskRequestValidationError is the validation error returned by
 // PeerTaskRequest.Validate if the designated constraints aren't met.
 type PeerTaskRequestValidationError struct {
@@ -267,73 +164,32 @@ var _ interface {
 } = PeerTaskRequestValidationError{}
 
 // Validate checks the field values on RegisterResult with the rules defined in
-// the proto definition for this message. If any rules are violated, the first
-// error encountered is returned, or nil if there are no violations.
+// the proto definition for this message. If any rules are violated, an error
+// is returned.
 func (m *RegisterResult) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on RegisterResult with the rules defined
-// in the proto definition for this message. If any rules are violated, the
-// result is a list of violation errors wrapped in RegisterResultMultiError,
-// or nil if none found.
-func (m *RegisterResult) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *RegisterResult) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if utf8.RuneCountInString(m.GetTaskId()) < 1 {
-		err := RegisterResultValidationError{
+		return RegisterResultValidationError{
 			field:  "TaskId",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if _, ok := base.SizeScope_name[int32(m.GetSizeScope())]; !ok {
-		err := RegisterResultValidationError{
+		return RegisterResultValidationError{
 			field:  "SizeScope",
 			reason: "value must be one of the defined enum values",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	switch m.DirectPiece.(type) {
 
 	case *RegisterResult_SinglePiece:
 
-		if all {
-			switch v := interface{}(m.GetSinglePiece()).(type) {
-			case interface{ ValidateAll() error }:
-				if err := v.ValidateAll(); err != nil {
-					errors = append(errors, RegisterResultValidationError{
-						field:  "SinglePiece",
-						reason: "embedded message failed validation",
-						cause:  err,
-					})
-				}
-			case interface{ Validate() error }:
-				if err := v.Validate(); err != nil {
-					errors = append(errors, RegisterResultValidationError{
-						field:  "SinglePiece",
-						reason: "embedded message failed validation",
-						cause:  err,
-					})
-				}
-			}
-		} else if v, ok := interface{}(m.GetSinglePiece()).(interface{ Validate() error }); ok {
+		if v, ok := interface{}(m.GetSinglePiece()).(interface{ Validate() error }); ok {
 			if err := v.Validate(); err != nil {
 				return RegisterResultValidationError{
 					field:  "SinglePiece",
@@ -348,29 +204,9 @@ func (m *RegisterResult) validate(all bool) error {
 
 	}
 
-	if len(errors) > 0 {
-		return RegisterResultMultiError(errors)
-	}
 	return nil
 }
 
-// RegisterResultMultiError is an error wrapping multiple validation errors
-// returned by RegisterResult.ValidateAll() if the designated constraints
-// aren't met.
-type RegisterResultMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m RegisterResultMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m RegisterResultMultiError) AllErrors() []error { return m }
-
 // RegisterResultValidationError is the validation error returned by
 // RegisterResult.Validate if the designated constraints aren't met.
 type RegisterResultValidationError struct {
@@ -426,69 +262,28 @@ var _ interface {
 } = RegisterResultValidationError{}
 
 // Validate checks the field values on SinglePiece with the rules defined in
-// the proto definition for this message. If any rules are violated, the first
-// error encountered is returned, or nil if there are no violations.
+// the proto definition for this message. If any rules are violated, an error
+// is returned.
 func (m *SinglePiece) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on SinglePiece with the rules defined in
-// the proto definition for this message. If any rules are violated, the
-// result is a list of violation errors wrapped in SinglePieceMultiError, or
-// nil if none found.
-func (m *SinglePiece) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *SinglePiece) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if utf8.RuneCountInString(m.GetDstPid()) < 1 {
-		err := SinglePieceValidationError{
+		return SinglePieceValidationError{
 			field:  "DstPid",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if utf8.RuneCountInString(m.GetDstAddr()) < 1 {
-		err := SinglePieceValidationError{
+		return SinglePieceValidationError{
 			field:  "DstAddr",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
-	if all {
-		switch v := interface{}(m.GetPieceInfo()).(type) {
-		case interface{ ValidateAll() error }:
-			if err := v.ValidateAll(); err != nil {
-				errors = append(errors, SinglePieceValidationError{
-					field:  "PieceInfo",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		case interface{ Validate() error }:
-			if err := v.Validate(); err != nil {
-				errors = append(errors, SinglePieceValidationError{
-					field:  "PieceInfo",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		}
-	} else if v, ok := interface{}(m.GetPieceInfo()).(interface{ Validate() error }); ok {
+	if v, ok := interface{}(m.GetPieceInfo()).(interface{ Validate() error }); ok {
 		if err := v.Validate(); err != nil {
 			return SinglePieceValidationError{
 				field:  "PieceInfo",
@@ -498,28 +293,9 @@ func (m *SinglePiece) validate(all bool) error {
 		}
 	}
 
-	if len(errors) > 0 {
-		return SinglePieceMultiError(errors)
-	}
 	return nil
 }
 
-// SinglePieceMultiError is an error wrapping multiple validation errors
-// returned by SinglePiece.ValidateAll() if the designated constraints aren't met.
-type SinglePieceMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m SinglePieceMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m SinglePieceMultiError) AllErrors() []error { return m }
-
 // SinglePieceValidationError is the validation error returned by
 // SinglePiece.Validate if the designated constraints aren't met.
 type SinglePieceValidationError struct {
@@ -575,82 +351,47 @@ var _ interface {
 } = SinglePieceValidationError{}
 
 // Validate checks the field values on PeerHost with the rules defined in the
-// proto definition for this message. If any rules are violated, the first
-// error encountered is returned, or nil if there are no violations.
+// proto definition for this message. If any rules are violated, an error is returned.
 func (m *PeerHost) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on PeerHost with the rules defined in
-// the proto definition for this message. If any rules are violated, the
-// result is a list of violation errors wrapped in PeerHostMultiError, or nil
-// if none found.
-func (m *PeerHost) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *PeerHost) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if err := m._validateUuid(m.GetUuid()); err != nil {
-		err = PeerHostValidationError{
+		return PeerHostValidationError{
 			field:  "Uuid",
 			reason: "value must be a valid UUID",
 			cause:  err,
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if ip := net.ParseIP(m.GetIp()); ip == nil {
-		err := PeerHostValidationError{
+		return PeerHostValidationError{
 			field:  "Ip",
 			reason: "value must be a valid IP address",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if val := m.GetRpcPort(); val < 1024 || val >= 65535 {
-		err := PeerHostValidationError{
+		return PeerHostValidationError{
 			field:  "RpcPort",
 			reason: "value must be inside range [1024, 65535)",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if val := m.GetDownPort(); val < 1024 || val >= 65535 {
-		err := PeerHostValidationError{
+		return PeerHostValidationError{
 			field:  "DownPort",
 			reason: "value must be inside range [1024, 65535)",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if err := m._validateHostname(m.GetHostName()); err != nil {
-		err = PeerHostValidationError{
+		return PeerHostValidationError{
 			field:  "HostName",
 			reason: "value must be a valid hostname",
 			cause:  err,
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	// no validation rules for SecurityDomain
@@ -661,9 +402,6 @@ func (m *PeerHost) validate(all bool) error {
 
 	// no validation rules for NetTopology
 
-	if len(errors) > 0 {
-		return PeerHostMultiError(errors)
-	}
 	return nil
 }
 
@@ -705,22 +443,6 @@ func (m *PeerHost) _validateUuid(uuid string) error {
 	return nil
 }
 
-// PeerHostMultiError is an error wrapping multiple validation errors returned
-// by PeerHost.ValidateAll() if the designated constraints aren't met.
-type PeerHostMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m PeerHostMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m PeerHostMultiError) AllErrors() []error { return m }
-
 // PeerHostValidationError is the validation error returned by
 // PeerHost.Validate if the designated constraints aren't met.
 type PeerHostValidationError struct {
@@ -776,71 +498,30 @@ var _ interface {
 } = PeerHostValidationError{}
 
 // Validate checks the field values on PieceResult with the rules defined in
-// the proto definition for this message. If any rules are violated, the first
-// error encountered is returned, or nil if there are no violations.
+// the proto definition for this message. If any rules are violated, an error
+// is returned.
 func (m *PieceResult) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on PieceResult with the rules defined in
-// the proto definition for this message. If any rules are violated, the
-// result is a list of violation errors wrapped in PieceResultMultiError, or
-// nil if none found.
-func (m *PieceResult) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *PieceResult) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if utf8.RuneCountInString(m.GetTaskId()) < 1 {
-		err := PieceResultValidationError{
+		return PieceResultValidationError{
 			field:  "TaskId",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if utf8.RuneCountInString(m.GetSrcPid()) < 1 {
-		err := PieceResultValidationError{
+		return PieceResultValidationError{
 			field:  "SrcPid",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	// no validation rules for DstPid
 
-	if all {
-		switch v := interface{}(m.GetPieceInfo()).(type) {
-		case interface{ ValidateAll() error }:
-			if err := v.ValidateAll(); err != nil {
-				errors = append(errors, PieceResultValidationError{
-					field:  "PieceInfo",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		case interface{ Validate() error }:
-			if err := v.Validate(); err != nil {
-				errors = append(errors, PieceResultValidationError{
-					field:  "PieceInfo",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		}
-	} else if v, ok := interface{}(m.GetPieceInfo()).(interface{ Validate() error }); ok {
+	if v, ok := interface{}(m.GetPieceInfo()).(interface{ Validate() error }); ok {
 		if err := v.Validate(); err != nil {
 			return PieceResultValidationError{
 				field:  "PieceInfo",
@@ -857,36 +538,13 @@ func (m *PieceResult) validate(all bool) error {
 	// no validation rules for Success
 
 	if _, ok := base.Code_name[int32(m.GetCode())]; !ok {
-		err := PieceResultValidationError{
+		return PieceResultValidationError{
 			field:  "Code",
 			reason: "value must be one of the defined enum values",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
-	if all {
-		switch v := interface{}(m.GetHostLoad()).(type) {
-		case interface{ ValidateAll() error }:
-			if err := v.ValidateAll(); err != nil {
-				errors = append(errors, PieceResultValidationError{
-					field:  "HostLoad",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		case interface{ Validate() error }:
-			if err := v.Validate(); err != nil {
-				errors = append(errors, PieceResultValidationError{
-					field:  "HostLoad",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		}
-	} else if v, ok := interface{}(m.GetHostLoad()).(interface{ Validate() error }); ok {
+	if v, ok := interface{}(m.GetHostLoad()).(interface{ Validate() error }); ok {
 		if err := v.Validate(); err != nil {
 			return PieceResultValidationError{
 				field:  "HostLoad",
@@ -898,28 +556,9 @@ func (m *PieceResult) validate(all bool) error {
 
 	// no validation rules for FinishedCount
 
-	if len(errors) > 0 {
-		return PieceResultMultiError(errors)
-	}
 	return nil
 }
 
-// PieceResultMultiError is an error wrapping multiple validation errors
-// returned by PieceResult.ValidateAll() if the designated constraints aren't met.
-type PieceResultMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m PieceResultMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m PieceResultMultiError) AllErrors() []error { return m }
-
 // PieceResultValidationError is the validation error returned by
 // PieceResult.Validate if the designated constraints aren't met.
 type PieceResultValidationError struct {
@@ -975,80 +614,34 @@ var _ interface {
 } = PieceResultValidationError{}
 
 // Validate checks the field values on PeerPacket with the rules defined in the
-// proto definition for this message. If any rules are violated, the first
-// error encountered is returned, or nil if there are no violations.
+// proto definition for this message. If any rules are violated, an error is returned.
 func (m *PeerPacket) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on PeerPacket with the rules defined in
-// the proto definition for this message. If any rules are violated, the
-// result is a list of violation errors wrapped in PeerPacketMultiError, or
-// nil if none found.
-func (m *PeerPacket) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *PeerPacket) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if utf8.RuneCountInString(m.GetTaskId()) < 1 {
-		err := PeerPacketValidationError{
+		return PeerPacketValidationError{
 			field:  "TaskId",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if utf8.RuneCountInString(m.GetSrcPid()) < 1 {
-		err := PeerPacketValidationError{
+		return PeerPacketValidationError{
 			field:  "SrcPid",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if m.GetParallelCount() < 1 {
-		err := PeerPacketValidationError{
+		return PeerPacketValidationError{
 			field:  "ParallelCount",
 			reason: "value must be greater than or equal to 1",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
-	if all {
-		switch v := interface{}(m.GetMainPeer()).(type) {
-		case interface{ ValidateAll() error }:
-			if err := v.ValidateAll(); err != nil {
-				errors = append(errors, PeerPacketValidationError{
-					field:  "MainPeer",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		case interface{ Validate() error }:
-			if err := v.Validate(); err != nil {
-				errors = append(errors, PeerPacketValidationError{
-					field:  "MainPeer",
-					reason: "embedded message failed validation",
-					cause:  err,
-				})
-			}
-		}
-	} else if v, ok := interface{}(m.GetMainPeer()).(interface{ Validate() error }); ok {
+	if v, ok := interface{}(m.GetMainPeer()).(interface{ Validate() error }); ok {
 		if err := v.Validate(); err != nil {
 			return PeerPacketValidationError{
 				field:  "MainPeer",
@@ -1061,26 +654,7 @@ func (m *PeerPacket) validate(all bool) error {
 	for idx, item := range m.GetStealPeers() {
 		_, _ = idx, item
 
-		if all {
-			switch v := interface{}(item).(type) {
-			case interface{ ValidateAll() error }:
-				if err := v.ValidateAll(); err != nil {
-					errors = append(errors, PeerPacketValidationError{
-						field:  fmt.Sprintf("StealPeers[%v]", idx),
-						reason: "embedded message failed validation",
-						cause:  err,
-					})
-				}
-			case interface{ Validate() error }:
-				if err := v.Validate(); err != nil {
-					errors = append(errors, PeerPacketValidationError{
-						field:  fmt.Sprintf("StealPeers[%v]", idx),
-						reason: "embedded message failed validation",
-						cause:  err,
-					})
-				}
-			}
-		} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
 			if err := v.Validate(); err != nil {
 				return PeerPacketValidationError{
 					field:  fmt.Sprintf("StealPeers[%v]", idx),
@@ -1093,38 +667,15 @@ func (m *PeerPacket) validate(all bool) error {
 	}
 
 	if _, ok := base.Code_name[int32(m.GetCode())]; !ok {
-		err := PeerPacketValidationError{
+		return PeerPacketValidationError{
 			field:  "Code",
 			reason: "value must be one of the defined enum values",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
-	if len(errors) > 0 {
-		return PeerPacketMultiError(errors)
-	}
 	return nil
 }
 
-// PeerPacketMultiError is an error wrapping multiple validation errors
-// returned by PeerPacket.ValidateAll() if the designated constraints aren't met.
-type PeerPacketMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m PeerPacketMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m PeerPacketMultiError) AllErrors() []error { return m }
-
 // PeerPacketValidationError is the validation error returned by
 // PeerPacket.Validate if the designated constraints aren't met.
 type PeerPacketValidationError struct {
@@ -1180,58 +731,31 @@ var _ interface {
 } = PeerPacketValidationError{}
 
 // Validate checks the field values on PeerResult with the rules defined in the
-// proto definition for this message. If any rules are violated, the first
-// error encountered is returned, or nil if there are no violations.
+// proto definition for this message. If any rules are violated, an error is returned.
 func (m *PeerResult) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on PeerResult with the rules defined in
-// the proto definition for this message. If any rules are violated, the
-// result is a list of violation errors wrapped in PeerResultMultiError, or
-// nil if none found.
-func (m *PeerResult) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *PeerResult) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if utf8.RuneCountInString(m.GetTaskId()) < 1 {
-		err := PeerResultValidationError{
+		return PeerResultValidationError{
 			field:  "TaskId",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if utf8.RuneCountInString(m.GetPeerId()) < 1 {
-		err := PeerResultValidationError{
+		return PeerResultValidationError{
 			field:  "PeerId",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if ip := net.ParseIP(m.GetSrcIp()); ip == nil {
-		err := PeerResultValidationError{
+		return PeerResultValidationError{
 			field:  "SrcIp",
 			reason: "value must be a valid IP address",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	// no validation rules for SecurityDomain
@@ -1239,24 +763,16 @@ func (m *PeerResult) validate(all bool) error {
 	// no validation rules for Idc
 
 	if uri, err := url.Parse(m.GetUrl()); err != nil {
-		err = PeerResultValidationError{
+		return PeerResultValidationError{
 			field:  "Url",
 			reason: "value must be a valid URI",
 			cause:  err,
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	} else if !uri.IsAbs() {
-		err := PeerResultValidationError{
+		return PeerResultValidationError{
 			field:  "Url",
 			reason: "value must be absolute",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	// no validation rules for ContentLength
@@ -1268,40 +784,17 @@ func (m *PeerResult) validate(all bool) error {
 	// no validation rules for Success
 
 	if _, ok := base.Code_name[int32(m.GetCode())]; !ok {
-		err := PeerResultValidationError{
+		return PeerResultValidationError{
 			field:  "Code",
 			reason: "value must be one of the defined enum values",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	// no validation rules for TotalPieceCount
 
-	if len(errors) > 0 {
-		return PeerResultMultiError(errors)
-	}
 	return nil
 }
 
-// PeerResultMultiError is an error wrapping multiple validation errors
-// returned by PeerResult.ValidateAll() if the designated constraints aren't met.
-type PeerResultMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m PeerResultMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m PeerResultMultiError) AllErrors() []error { return m }
-
 // PeerResultValidationError is the validation error returned by
 // PeerResult.Validate if the designated constraints aren't met.
 type PeerResultValidationError struct {
@@ -1357,71 +850,29 @@ var _ interface {
 } = PeerResultValidationError{}
 
 // Validate checks the field values on PeerTarget with the rules defined in the
-// proto definition for this message. If any rules are violated, the first
-// error encountered is returned, or nil if there are no violations.
+// proto definition for this message. If any rules are violated, an error is returned.
 func (m *PeerTarget) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on PeerTarget with the rules defined in
-// the proto definition for this message. If any rules are violated, the
-// result is a list of violation errors wrapped in PeerTargetMultiError, or
-// nil if none found.
-func (m *PeerTarget) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *PeerTarget) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if utf8.RuneCountInString(m.GetTaskId()) < 1 {
-		err := PeerTargetValidationError{
+		return PeerTargetValidationError{
 			field:  "TaskId",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if utf8.RuneCountInString(m.GetPeerId()) < 1 {
-		err := PeerTargetValidationError{
+		return PeerTargetValidationError{
 			field:  "PeerId",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
-	if len(errors) > 0 {
-		return PeerTargetMultiError(errors)
-	}
 	return nil
 }
 
-// PeerTargetMultiError is an error wrapping multiple validation errors
-// returned by PeerTarget.ValidateAll() if the designated constraints aren't met.
-type PeerTargetMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m PeerTargetMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m PeerTargetMultiError) AllErrors() []error { return m }
-
 // PeerTargetValidationError is the validation error returned by
 // PeerTarget.Validate if the designated constraints aren't met.
 type PeerTargetValidationError struct {
@@ -1478,82 +929,36 @@ var _ interface {
 
 // Validate checks the field values on PeerPacket_DestPeer with the rules
 // defined in the proto definition for this message. If any rules are
-// violated, the first error encountered is returned, or nil if there are no violations.
+// violated, an error is returned.
 func (m *PeerPacket_DestPeer) Validate() error {
-	return m.validate(false)
-}
-
-// ValidateAll checks the field values on PeerPacket_DestPeer with the rules
-// defined in the proto definition for this message. If any rules are
-// violated, the result is a list of violation errors wrapped in
-// PeerPacket_DestPeerMultiError, or nil if none found.
-func (m *PeerPacket_DestPeer) ValidateAll() error {
-	return m.validate(true)
-}
-
-func (m *PeerPacket_DestPeer) validate(all bool) error {
 	if m == nil {
 		return nil
 	}
 
-	var errors []error
-
 	if ip := net.ParseIP(m.GetIp()); ip == nil {
-		err := PeerPacket_DestPeerValidationError{
+		return PeerPacket_DestPeerValidationError{
 			field:  "Ip",
 			reason: "value must be a valid IP address",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if val := m.GetRpcPort(); val < 1024 || val >= 65535 {
-		err := PeerPacket_DestPeerValidationError{
+		return PeerPacket_DestPeerValidationError{
 			field:  "RpcPort",
 			reason: "value must be inside range [1024, 65535)",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
 	if utf8.RuneCountInString(m.GetPeerId()) < 1 {
-		err := PeerPacket_DestPeerValidationError{
+		return PeerPacket_DestPeerValidationError{
 			field:  "PeerId",
 			reason: "value length must be at least 1 runes",
 		}
-		if !all {
-			return err
-		}
-		errors = append(errors, err)
 	}
 
-	if len(errors) > 0 {
-		return PeerPacket_DestPeerMultiError(errors)
-	}
 	return nil
 }
 
-// PeerPacket_DestPeerMultiError is an error wrapping multiple validation
-// errors returned by PeerPacket_DestPeer.ValidateAll() if the designated
-// constraints aren't met.
-type PeerPacket_DestPeerMultiError []error
-
-// Error returns a concatenation of all the error messages it wraps.
-func (m PeerPacket_DestPeerMultiError) Error() string {
-	var msgs []string
-	for _, err := range m {
-		msgs = append(msgs, err.Error())
-	}
-	return strings.Join(msgs, "; ")
-}
-
-// AllErrors returns a list of validation violation errors.
-func (m PeerPacket_DestPeerMultiError) AllErrors() []error { return m }
-
 // PeerPacket_DestPeerValidationError is the validation error returned by
 // PeerPacket_DestPeer.Validate if the designated constraints aren't met.
 type PeerPacket_DestPeerValidationError struct {
diff --git a/pkg/rpc/scheduler/scheduler_grpc.pb.go b/pkg/rpc/scheduler/scheduler_grpc.pb.go
index 2ac29781..a1b1c414 100644
--- a/pkg/rpc/scheduler/scheduler_grpc.pb.go
+++ b/pkg/rpc/scheduler/scheduler_grpc.pb.go
@@ -12,6 +12,7 @@ import (
 
 // This is a compile-time assertion to ensure that this generated file
 // is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
 const _ = grpc.SupportPackageIsVersion7
 
 // SchedulerClient is the client API for Scheduler service.
@@ -48,7 +49,7 @@ func (c *schedulerClient) RegisterPeerTask(ctx context.Context, in *PeerTaskRequ
 }
 
 func (c *schedulerClient) ReportPieceResult(ctx context.Context, opts ...grpc.CallOption) (Scheduler_ReportPieceResultClient, error) {
-	stream, err := c.cc.NewStream(ctx, &_Scheduler_serviceDesc.Streams[0], "/scheduler.Scheduler/ReportPieceResult", opts...)
+	stream, err := c.cc.NewStream(ctx, &Scheduler_ServiceDesc.Streams[0], "/scheduler.Scheduler/ReportPieceResult", opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -139,7 +140,7 @@ type UnsafeSchedulerServer interface {
 }
 
 func RegisterSchedulerServer(s grpc.ServiceRegistrar, srv SchedulerServer) {
-	s.RegisterService(&_Scheduler_serviceDesc, srv)
+	s.RegisterService(&Scheduler_ServiceDesc, srv)
 }
 
 func _Scheduler_RegisterPeerTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
@@ -222,7 +223,10 @@ func _Scheduler_LeaveTask_Handler(srv interface{}, ctx context.Context, dec func
 	return interceptor(ctx, in, info, handler)
 }
 
-var _Scheduler_serviceDesc = grpc.ServiceDesc{
+// Scheduler_ServiceDesc is the grpc.ServiceDesc for Scheduler service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var Scheduler_ServiceDesc = grpc.ServiceDesc{
 	ServiceName: "scheduler.Scheduler",
 	HandlerType: (*SchedulerServer)(nil),
 	Methods: []grpc.MethodDesc{
diff --git a/scheduler/resource/peer.go b/scheduler/resource/peer.go
index 8d4f5406..eb214b09 100644
--- a/scheduler/resource/peer.go
+++ b/scheduler/resource/peer.go
@@ -26,6 +26,7 @@ import (
 	"time"
 
 	"github.com/bits-and-blooms/bitset"
+	"github.com/go-http-utils/headers"
 	"github.com/looplab/fsm"
 	"go.uber.org/atomic"
 
@@ -402,6 +403,7 @@ func (p *Peer) DownloadTinyFile(ctx context.Context) ([]byte, error) {
 	if err != nil {
 		return []byte{}, err
 	}
+	req.Header.Set(headers.Range, fmt.Sprintf("bytes=%d-%d", 0, p.Task.ContentLength.Load()))
 
 	resp, err := http.DefaultClient.Do(req)
 	if err != nil {
@@ -409,5 +411,9 @@ func (p *Peer) DownloadTinyFile(ctx context.Context) ([]byte, error) {
 	}
 	defer resp.Body.Close()
 
+	if resp.StatusCode != http.StatusOK {
+		return []byte{}, fmt.Errorf("%v: %v", url.String(), resp.Status)
+	}
+
 	return io.ReadAll(resp.Body)
 }


Test patch:
diff --git a/scheduler/resource/peer_test.go b/scheduler/resource/peer_test.go
index 73ea59d8..77466dc9 100644
--- a/scheduler/resource/peer_test.go
+++ b/scheduler/resource/peer_test.go
@@ -18,14 +18,17 @@ package resource
 
 import (
 	"context"
+	"fmt"
 	"net"
 	"net/http"
 	"net/http/httptest"
 	"net/url"
+	"path"
 	"strconv"
 	"testing"
 	"time"
 
+	"github.com/go-http-utils/headers"
 	"github.com/golang/mock/gomock"
 	"github.com/stretchr/testify/assert"
 
@@ -867,6 +870,16 @@ func TestPeer_DeleteStream(t *testing.T) {
 
 func TestPeer_DownloadTinyFile(t *testing.T) {
 	s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+		if path.Base(r.URL.Path) == "foo" {
+			w.WriteHeader(http.StatusNotFound)
+			return
+		}
+
+		if r.Header.Get(headers.Range) == "bytes=0-2" {
+			w.WriteHeader(http.StatusNotAcceptable)
+			return
+		}
+
 		w.WriteHeader(http.StatusOK)
 	}))
 	defer s.Close()
@@ -886,6 +899,19 @@ func TestPeer_DownloadTinyFile(t *testing.T) {
 				assert.NoError(err)
 			},
 		},
+		{
+			name: "download tiny file with range header",
+			expect: func(t *testing.T, peer *Peer) {
+				assert := assert.New(t)
+				peer.Task.ContentLength.Store(2)
+				ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
+				defer cancel()
+
+				_, err := peer.DownloadTinyFile(ctx)
+				assert.EqualError(err, fmt.Sprintf("http://%s:%d/download/%s/%s?peerId=scheduler: 406 Not Acceptable",
+					peer.Host.IP, peer.Host.DownloadPort, peer.Task.ID[:3], peer.Task.ID))
+			},
+		},
 		{
 			name: "download tiny file failed because of port error",
 			expect: func(t *testing.T, peer *Peer) {
@@ -910,6 +936,19 @@ func TestPeer_DownloadTinyFile(t *testing.T) {
 				assert.Error(err)
 			},
 		},
+		{
+			name: "download tiny file failed because of http status code",
+			expect: func(t *testing.T, peer *Peer) {
+				assert := assert.New(t)
+				peer.Task.ID = "foo"
+				ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
+				defer cancel()
+
+				_, err := peer.DownloadTinyFile(ctx)
+				assert.EqualError(err, fmt.Sprintf("http://%s:%d/download/%s/%s?peerId=scheduler: 404 Not Found",
+					peer.Host.IP, peer.Host.DownloadPort, peer.Task.ID[:3], peer.Task.ID))
+			},
+		},
 	}
 
 	for _, tc := range tests {