From 19f01eee7c853c853f6eb9314cc9fab7a05e4b81 Mon Sep 17 00:00:00 2001 From: Sydonian <794346190@qq.com> Date: Thu, 24 Aug 2023 16:09:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?EC=E7=9A=84PacketSize=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E5=88=B0=E5=A4=87=E4=BB=BD=E6=96=B9=E5=BC=8F=E7=9A=84=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/task/create_ec_package.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/internal/task/create_ec_package.go b/internal/task/create_ec_package.go index 61fad01..a7f3ef6 100644 --- a/internal/task/create_ec_package.go +++ b/internal/task/create_ec_package.go @@ -5,7 +5,6 @@ import ( "gitlink.org.cn/cloudream/common/models" "gitlink.org.cn/cloudream/common/pkgs/logger" - "gitlink.org.cn/cloudream/storage-agent/internal/config" "gitlink.org.cn/cloudream/storage-common/pkgs/cmd" "gitlink.org.cn/cloudream/storage-common/pkgs/iterator" ) @@ -29,11 +28,8 @@ func (t *CreateECPackage) Execute(ctx TaskContext, complete CompleteFn) { log.Debugf("begin") defer log.Debugf("end") - ret, err := t.cmd.Execute(&cmd.UpdateECPackageContext{ - UpdatePackageContext: &cmd.UpdatePackageContext{ - Distlock: ctx.distlock, - }, - ECPacketSize: config.Cfg().ECPacketSize, + ret, err := t.cmd.Execute(&cmd.UpdatePackageContext{ + Distlock: ctx.distlock, }) t.Result = ret From d3fab3cc6d907550eadbcdc60ccf8c4323a68355 Mon Sep 17 00:00:00 2001 From: Sydonian <794346190@qq.com> Date: Thu, 24 Aug 2023 17:13:16 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=AC=E5=85=B1?= =?UTF-8?q?=E7=BB=93=E6=9E=84=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/services/mq/storage.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/services/mq/storage.go b/internal/services/mq/storage.go index 3aeeabb..1adfc12 100644 --- a/internal/services/mq/storage.go +++ b/internal/services/mq/storage.go @@ -8,7 +8,6 @@ import ( "github.com/samber/lo" "gitlink.org.cn/cloudream/common/consts/errorcode" - "gitlink.org.cn/cloudream/common/models" "gitlink.org.cn/cloudream/common/pkgs/logger" "gitlink.org.cn/cloudream/common/pkgs/mq" "gitlink.org.cn/cloudream/storage-agent/internal/config" @@ -196,7 +195,7 @@ func (svc *Service) StartStorageCreatePackage(msg *agtmq.StartStorageCreatePacka objIter := iterator.NewUploadingObjectIterator(fullPath, uploadFilePathes) - if msg.Redundancy.Type == models.RedundancyRep { + if msg.Redundancy.IsRepInfo() { repInfo, err := msg.Redundancy.ToRepInfo() if err != nil { logger.Warnf("getting rep redundancy info: %s", err.Error())