diff options
| author | chrislu <chris.lu@gmail.com> | 2023-03-21 23:01:49 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2023-03-21 23:01:49 -0700 |
| commit | 5db9fcccd4194660a8503696ac44c3539c29d41e (patch) | |
| tree | 9c2afed1dcfb5b958208fbc095919152eb32fc7d /weed/filer/filer.go | |
| parent | de4545c28b8283fb80ae03dc95910a0ab3a67142 (diff) | |
| download | seaweedfs-5db9fcccd4194660a8503696ac44c3539c29d41e.tar.xz seaweedfs-5db9fcccd4194660a8503696ac44c3539c29d41e.zip | |
refactoring
Diffstat (limited to 'weed/filer/filer.go')
| -rw-r--r-- | weed/filer/filer.go | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/weed/filer/filer.go b/weed/filer/filer.go index f6f06d9b2..8ba8f9cfa 100644 --- a/weed/filer/filer.go +++ b/weed/filer/filer.go @@ -87,10 +87,23 @@ func (f *Filer) MaybeBootstrapFromPeers(self pb.ServerAddress, existingNodes []* glog.V(0).Infof("bootstrap from %v clientId:%d", earliestNode.Address, f.UniqueFilerId) f.UniqueFilerEpoch++ - err = pb.FollowMetadata(pb.ServerAddress(earliestNode.Address), f.GrpcDialOption, "bootstrap", f.UniqueFilerId, f.UniqueFilerEpoch, "/", nil, - 0, snapshotTime.UnixNano(), f.Signature, func(resp *filer_pb.SubscribeMetadataResponse) error { - return Replay(f.Store, resp) - }, pb.FatalOnError) + + metadataFollowOption := &pb.MetadataFollowOption{ + ClientName: "bootstrap", + ClientId: f.UniqueFilerId, + ClientEpoch: f.UniqueFilerEpoch, + SelfSignature: f.Signature, + PathPrefix: "/", + AdditionalPathPrefixes: nil, + DirectoriesToWatch: nil, + StartTsNs: snapshotTime.UnixNano(), + StopTsNs: 0, + EventErrorType: pb.FatalOnError, + } + + err = pb.FollowMetadata(pb.ServerAddress(earliestNode.Address), f.GrpcDialOption, metadataFollowOption, func(resp *filer_pb.SubscribeMetadataResponse) error { + return Replay(f.Store, resp) + }) return } |
