|
@ -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) |
|
|
|
|
|
|
|
|