diff options
| author | chrislu <chris.lu@gmail.com> | 2024-07-12 11:17:28 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2024-07-12 11:17:30 -0700 |
| commit | 3a82f5ffad3122a3adeb9e652cee72420a2f6f97 (patch) | |
| tree | bc2df43aee7f59e8b183eadb52ef6b3fdce14e06 /weed/command/filer_sync.go | |
| parent | ec9e7493b34df5c13462cdaeab5b35f152d0cb68 (diff) | |
| download | seaweedfs-3a82f5ffad3122a3adeb9e652cee72420a2f6f97.tar.xz seaweedfs-3a82f5ffad3122a3adeb9e652cee72420a2f6f97.zip | |
ensure metadata follow a specific folder
fix https://github.com/seaweedfs/seaweedfs/issues/5774
Diffstat (limited to 'weed/command/filer_sync.go')
| -rw-r--r-- | weed/command/filer_sync.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/weed/command/filer_sync.go b/weed/command/filer_sync.go index 9ad76e31b..9d29b6fee 100644 --- a/weed/command/filer_sync.go +++ b/weed/command/filer_sync.go @@ -296,12 +296,17 @@ func doSubscribeFilerMetaChanges(clientId int32, clientEpoch int32, grpcDialOpti return setOffset(grpcDialOption, targetFiler, getSignaturePrefixByPath(sourcePath), sourceFilerSignature, offsetTsNs) }) + prefix := sourcePath + if !strings.HasSuffix(prefix, "/") { + prefix = prefix + "/" + } + metadataFollowOption := &pb.MetadataFollowOption{ ClientName: clientName, ClientId: clientId, ClientEpoch: clientEpoch, SelfSignature: targetFilerSignature, - PathPrefix: sourcePath, + PathPrefix: prefix, AdditionalPathPrefixes: nil, DirectoriesToWatch: nil, StartTsNs: sourceFilerOffsetTsNs, |
