mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
more logging related to filer metadata subscription
This commit is contained in:
parent
abeb7f65f8
commit
aca20cd9f4
|
@ -185,7 +185,7 @@ func (ma *MetaAggregator) doSubscribeToOneFiler(f *Filer, self pb.ServerAddress,
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
glog.V(4).Infof("subscribing remote %s meta change: %v, clientId:%d", peer, time.Unix(0, lastTsNs), ma.filer.UniqueFileId)
|
glog.V(0).Infof("subscribing remote %s meta change: %v, clientId:%d", peer, time.Unix(0, lastTsNs), ma.filer.UniqueFileId)
|
||||||
err = pb.WithFilerClient(true, peer, ma.grpcDialOption, func(client filer_pb.SeaweedFilerClient) error {
|
err = pb.WithFilerClient(true, peer, ma.grpcDialOption, func(client filer_pb.SeaweedFilerClient) error {
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
|
@ -95,12 +95,15 @@ func (fs *FilerServer) SubscribeLocalMetadata(req *filer_pb.SubscribeMetadataReq
|
||||||
|
|
||||||
alreadyKnown, clientName := fs.addClient(req.ClientName, peerAddress, req.ClientId)
|
alreadyKnown, clientName := fs.addClient(req.ClientName, peerAddress, req.ClientId)
|
||||||
if alreadyKnown {
|
if alreadyKnown {
|
||||||
return fmt.Errorf("duplicated local subscription detected for client %s id %d", clientName, req.ClientId)
|
return fmt.Errorf("duplicated local subscription detected for client %s clientId:%d", clientName, req.ClientId)
|
||||||
}
|
}
|
||||||
defer fs.deleteClient(clientName, req.ClientId)
|
defer func() {
|
||||||
|
glog.V(0).Infof(" - %v local subscribe %s clientId:%d", clientName, req.PathPrefix, req.ClientId)
|
||||||
|
fs.deleteClient(clientName, req.ClientId)
|
||||||
|
}()
|
||||||
|
|
||||||
lastReadTime := time.Unix(0, req.SinceNs)
|
lastReadTime := time.Unix(0, req.SinceNs)
|
||||||
glog.V(0).Infof(" %v local subscribe %s from %+v", clientName, req.PathPrefix, lastReadTime)
|
glog.V(0).Infof(" + %v local subscribe %s from %+v clientId:%d", clientName, req.PathPrefix, lastReadTime, req.ClientId)
|
||||||
|
|
||||||
eachEventNotificationFn := fs.eachEventNotificationFn(req, stream, clientName)
|
eachEventNotificationFn := fs.eachEventNotificationFn(req, stream, clientName)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue