You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/01/15 05:41:38 UTC
[GitHub] [skywalking-banyandb] lujiajing1126 commented on a change in pull request #66: Reload stream when metadata changes
lujiajing1126 commented on a change in pull request #66:
URL: https://github.com/apache/skywalking-banyandb/pull/66#discussion_r785274500
##########
File path: banyand/stream/service.go
##########
@@ -52,23 +53,29 @@ type Service interface {
var _ Service = (*service)(nil)
type service struct {
- schemaMap map[string]*stream
+ schemaMap sync.Map
writeListener *writeCallback
l *logger.Logger
metadata metadata.Repo
root string
pipeline queue.Queue
repo discovery.ServiceRepo
- stopCh chan struct{}
+ // stop channel for the service
+ stopCh chan struct{}
+ // stop channel for the inner worker
+ stopCh2 chan struct{}
+
+ updateCh chan *databasev1.Stream
+ deleteCh chan *commonv1.Metadata
Review comment:
a single event channel is used.
##########
File path: banyand/stream/service.go
##########
@@ -52,23 +53,29 @@ type Service interface {
var _ Service = (*service)(nil)
type service struct {
- schemaMap map[string]*stream
+ schemaMap sync.Map
writeListener *writeCallback
l *logger.Logger
metadata metadata.Repo
root string
pipeline queue.Queue
repo discovery.ServiceRepo
- stopCh chan struct{}
+ // stop channel for the service
+ stopCh chan struct{}
+ // stop channel for the inner worker
+ stopCh2 chan struct{}
Review comment:
Fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org