lujiajing1126 commented on code in PR #153:
URL:
https://github.com/apache/skywalking-banyandb/pull/153#discussion_r941469793
##########
banyand/tsdb/index/writer.go:
##########
@@ -76,36 +77,37 @@ func NewWriter(ctx context.Context, options WriterOptions)
*Writer {
}
w.shardNum = options.ShardNum
w.db = options.DB
+ w.enableGlobalIndex = options.EnableGlobalIndex
w.indexRuleIndex = partition.ParseIndexRuleLocators(options.Families,
options.IndexRules)
- w.ch = run.NewChan[Message](make(chan Message))
+ w.ch = make(chan Message)
w.bootIndexGenerator()
return w
}
func (s *Writer) Write(value Message) {
go func(m Message) {
- s.ch.Write(m)
+ s.ch <- m
}(value)
}
func (s *Writer) Close() error {
- return s.ch.Close()
Review Comment:
Since we removed `Close()` here, is it possible we still have many
goroutines waiting to write to the channel?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]