damondouglas commented on code in PR #31028:
URL: https://github.com/apache/beam/pull/31028#discussion_r1587961096
##########
sdks/go/pkg/beam/runners/prism/internal/jobservices/management.go:
##########
@@ -243,8 +243,8 @@ func (s *Server) Run(ctx context.Context, req
*jobpb.RunJobRequest) (*jobpb.RunJ
// Otherwise, returns nil if Job does not exist or the Job's existing state as
part of the CancelJobResponse.
func (s *Server) Cancel(_ context.Context, req *jobpb.CancelJobRequest)
(*jobpb.CancelJobResponse, error) {
s.mu.Lock()
+ defer s.mu.Unlock()
Review Comment:
Now it makes sense to me that state is an atomic.Value and thus I didn't
need to put a lock on the whole service. I only lock/unlock when acquiring the
Job just like all the other methods.
--
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]