lostluck commented on code in PR #26374:
URL: https://github.com/apache/beam/pull/26374#discussion_r1175438851
##########
sdks/go/pkg/beam/core/runtime/exec/plan.go:
##########
@@ -189,10 +197,11 @@ func (p *Plan) GetExpirationTime() time.Time {
// Down takes the plan and associated units down. Does not panic.
func (p *Plan) Down(ctx context.Context) error {
- if p.status == Down {
+ // Technically racy, but only one thread calls this method on the plan.
Review Comment:
Yes. Only one goroutine manages the bundle lifecycle.
By design, all Plans and execution state is per processing bundle, which
will only happen in a single goroutine. Recall it's not supported for any of
the DoFn structures to be called from other goroutines (like the iterators and
emitters).
The exception here is the Split and Progress requests, which do interact
with the state in another goroutine. This care didn't happen with the Status
field, hence the race.
--
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]