Open asido opened 2 years ago
Yeah, AFAICT the shutdown process just closes a channel and returns :| so there's no way to wait for a clean shutdown.
There are a few other shutdown leaks throughout the client, unfortunately they're definitely not all simple fixes.
As far as this error:
$ go get .
# go.uber.org/cadence/internal/common
../../../go/pkg/mod/go.uber.org/cadence@v0.18.2/internal/common/thrift_util.go:31:38: not enough arguments in call to thrift.NewTSerializer().Write
have (thrift.TStruct)
want (context.Context, thrift.TStruct)
../../../go/pkg/mod/go.uber.org/cadence@v0.18.2/internal/common/thrift_util.go:53:27: not enough arguments in call to t.Protocol.Flush
have ()
want (context.Context)
../../../go/pkg/mod/go.uber.org/cadence@v0.18.2/internal/common/thrift_util.go:57:28: not enough arguments in call to t.Transport.Flush
have ()
want (context.Context)
^ that means you already have a version of thrift that's too new for cadence. They made a breaking change without releasing a new version, and go modules do not allow specifying upper limits, so unfortunately you need to downgrade it to something compatible. If you do a "clean" go get
, it works, because that downloads the minimum versions we specify in our go.mod file.
You can pin the thrift version: like this: https://github.com/uber/cadence/blob/d3d06825adcf11c20ec3fc58e329f1d9560bb729/go.mod#L92
Describe the bug
Worker.Stop()
doesn't await for goroutines to stop, which goleak identifies as a goroutine leak.To Reproduce Is the issue reproducible?
Steps to reproduce the behavior:
go.mod
:main.go
:main_test.go
:Expected behavior
Additional Context Used cadence-client
v0.17.0
, because with the program abovev0.18.2
download fails. But the reported problem is in both releases.