From 05d3293d4714812a4640d46b66e8c858deec10b1 Mon Sep 17 00:00:00 2001 From: Sydonian <794346190@qq.com> Date: Thu, 5 Jun 2025 10:12:38 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/internal/mount/mount_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/internal/mount/mount_linux.go b/client/internal/mount/mount_linux.go index 45207cf..1d4dfb6 100644 --- a/client/internal/mount/mount_linux.go +++ b/client/internal/mount/mount_linux.go @@ -99,7 +99,7 @@ func (m *Mount) Dump() MountStatus { } } -func (m *Mount) ReclaimSpace() { +func (m *Mount) StartReclaimSpace() { if m.vfs == nil { return } From fc710a8b726cc2e7e0bdb1937b6836905f79cf9b Mon Sep 17 00:00:00 2001 From: Sydonian <794346190@qq.com> Date: Thu, 5 Jun 2025 11:39:25 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/assets/confs/client.config.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/common/assets/confs/client.config.json b/common/assets/confs/client.config.json index a29c46e..91a13ba 100644 --- a/common/assets/confs/client.config.json +++ b/common/assets/confs/client.config.json @@ -3,15 +3,11 @@ "locationID": 1 }, "hubRPC": { - "rootCA": "", - "clientCert": "", - "clientKey": "" + "rootCA": "" }, "coordinatorRPC": { "address": "127.0.0.1:5009", - "rootCA": "", - "clientCert": "", - "clientKey": "" + "rootCA": "" }, "logger": { "output": "stdout", From 95f981a9a121fb9c8bf6db98876bb782b06a6118 Mon Sep 17 00:00:00 2001 From: Sydonian <794346190@qq.com> Date: Fri, 6 Jun 2025 09:57:47 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B4=A9=E6=BA=83?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/internal/uploader/uploader.go | 8 +++++--- client/internal/uploader/user_space_upload.go | 3 ++- coordinator/types/storage.go | 17 ----------------- 3 files changed, 7 insertions(+), 21 deletions(-) diff --git a/client/internal/uploader/uploader.go b/client/internal/uploader/uploader.go index f2b5e3a..3e19da0 100644 --- a/client/internal/uploader/uploader.go +++ b/client/internal/uploader/uploader.go @@ -58,9 +58,11 @@ func (u *Uploader) BeginUpdate(pkgID clitypes.PackageID, affinity clitypes.UserS for _, space := range spaceDetails { latency := time.Duration(math.MaxInt64) - con, ok := cons[space.RecommendHub.HubID] - if ok && con.Latency != nil { - latency = *con.Latency + if space.RecommendHub != nil { + con, ok := cons[space.RecommendHub.HubID] + if ok && con.Latency != nil { + latency = *con.Latency + } } uploadSpaces = append(uploadSpaces, UploadSpaceInfo{ diff --git a/client/internal/uploader/user_space_upload.go b/client/internal/uploader/user_space_upload.go index 639832e..e062b19 100644 --- a/client/internal/uploader/user_space_upload.go +++ b/client/internal/uploader/user_space_upload.go @@ -54,7 +54,8 @@ func (u *Uploader) UserSpaceUpload(userSpaceID clitypes.UserSpaceID, rootPath st }) var uploadSpaces []UploadSpaceInfo - if !stgglb.StandaloneMode { + // TODO 应该要分离Standalone模式和RecommendHub为nil的情况 + if !stgglb.StandaloneMode && srcSpace.RecommendHub != nil { coorCli := stgglb.CoordinatorRPCPool.Get() defer coorCli.Release() diff --git a/coordinator/types/storage.go b/coordinator/types/storage.go index ce34730..35390df 100644 --- a/coordinator/types/storage.go +++ b/coordinator/types/storage.go @@ -41,7 +41,6 @@ type StorageType interface { } var _ = serder.UseTypeUnionInternallyTagged(types.Ref(types.NewTypeUnion[StorageType]( - // (*MashupStorageType)(nil), (*LocalType)(nil), (*OBSType)(nil), (*OSSType)(nil), @@ -50,22 +49,6 @@ var _ = serder.UseTypeUnionInternallyTagged(types.Ref(types.NewTypeUnion[Storage (*S3Type)(nil), )), "type") -// // 多种存储服务的混合存储服务。需谨慎选择存储服务的组合,避免出Bug -// type MashupStorageType struct { -// serder.Metadata `union:"Mashup"` -// Type string `json:"type"` -// Store StorageType `json:"store"` // 创建ShardStore或BaseStore时,使用的存储服务类型 -// Feature StorageType `json:"feature"` // 根据Feature创建组件时使用的存储服务类型 -// } - -// func (a *MashupStorageType) GetStorageType() string { -// return "Mashup" -// } - -// func (a *MashupStorageType) String() string { -// return "Mashup" -// } - type LocalType struct { serder.Metadata `union:"Local"` Type string `json:"type"`