riteshghorse commented on a change in pull request #15657:
URL: https://github.com/apache/beam/pull/15657#discussion_r738457370
##########
File path: sdks/go/pkg/beam/core/metrics/metrics.go
##########
@@ -136,6 +136,10 @@ func SetPTransformID(ctx context.Context, id string)
context.Context {
// Checking for *beamCtx is an optimization, so we don't dig deeply
// for ids if not necessary.
if bctx, ok := ctx.(*beamCtx); ok {
+ if _, ok := bctx.store.stateRegistry[id]; !ok {
+ bctx.store.stateRegistry[id] =
[4]*ExecutionState{&ExecutionState{}, &ExecutionState{}, &ExecutionState{},
&ExecutionState{}}
Review comment:
`stateRegistry ` is of pointer value. If we do `[4]*ExecutionState{}` it
throws error as `assignment to nil map`.
--
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]