diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2022-01-02 01:11:27 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-02 01:11:27 -0800 |
| commit | 077f831749e6bbf12ff52fd369b493e4dd751817 (patch) | |
| tree | 81912d857c0dcc0dba64661aa8f06ba81e68a40a /weed/command/filer_meta_tail.go | |
| parent | 9b941773805400c520558d83aed633adc821988c (diff) | |
| parent | 42c849e0df74610d38453db67670db715ceb80aa (diff) | |
| download | seaweedfs-077f831749e6bbf12ff52fd369b493e4dd751817.tar.xz seaweedfs-077f831749e6bbf12ff52fd369b493e4dd751817.zip | |
Merge pull request #2550 from chrislusf/metadata_follow_with_client_id
add client id for all metadata listening clients
Diffstat (limited to 'weed/command/filer_meta_tail.go')
| -rw-r--r-- | weed/command/filer_meta_tail.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/weed/command/filer_meta_tail.go b/weed/command/filer_meta_tail.go index 26b155440..1158ef1e0 100644 --- a/weed/command/filer_meta_tail.go +++ b/weed/command/filer_meta_tail.go @@ -6,7 +6,7 @@ import ( "github.com/chrislusf/seaweedfs/weed/pb" "github.com/golang/protobuf/jsonpb" jsoniter "github.com/json-iterator/go" - "github.com/olivere/elastic/v7" + elastic "github.com/olivere/elastic/v7" "os" "path/filepath" "strings" @@ -48,6 +48,7 @@ func runFilerMetaTail(cmd *Command, args []string) bool { util.LoadConfiguration("security", false) grpcDialOption := security.LoadClientTLS(util.GetViper(), "grpc.client") + clientId := util.RandomInt32() var filterFunc func(dir, fname string) bool if *tailPattern != "" { @@ -105,7 +106,7 @@ func runFilerMetaTail(cmd *Command, args []string) bool { } } - tailErr := pb.FollowMetadata(pb.ServerAddress(*tailFiler), grpcDialOption, "tail", + tailErr := pb.FollowMetadata(pb.ServerAddress(*tailFiler), grpcDialOption, "tail", clientId, *tailTarget, nil, time.Now().Add(-*tailStart).UnixNano(), 0, func(resp *filer_pb.SubscribeMetadataResponse) error { if !shouldPrint(resp) { |
