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 2023/01/02 11:29:07 UTC

[GitHub] [skywalking-banyandb] hanahmily commented on a diff in pull request #236: Fix liaison/grpc's leaked goroutines

hanahmily commented on code in PR #236:
URL: https://github.com/apache/skywalking-banyandb/pull/236#discussion_r1059976876


##########
banyand/discovery/discovery.go:
##########
@@ -33,6 +33,7 @@ type ServiceRepo interface {
 	run.Unit
 	bus.Subscriber
 	bus.Publisher
+	GracefulStop()

Review Comment:
   Use `run.Service` in place of `GracefulStop`. The lifecycle framework will stop the repo gracefully.



##########
banyand/liaison/grpc/registry_test.go:
##########
@@ -193,12 +200,16 @@ func setupForRegistry() func() {
 		preloadStreamSvc,
 		tcp,
 	)
+	moduleDeferFunc := func() {

Review Comment:
   Could you remove this defer function? If the repo uses the lifecycle framework to stop, `deferFunc` will help stop this repo. You don't have to add a separate one.



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