lostluck commented on code in PR #29761:
URL: https://github.com/apache/beam/pull/29761#discussion_r1425902388


##########
sdks/go/pkg/beam/core/runtime/harness/harness.go:
##########
@@ -662,7 +662,7 @@ func (c *control) handleInstruction(ctx context.Context, 
req *fnpb.InstructionRe
                                },
                        },
                }
-       case req.GetSampleData() != nil:
+       case req.GetSampleData() != nil && c.dataSampler != nil:

Review Comment:
   This isn't an ideal fix. 
   
   As much as the Runner shouldn't be sending sample requests, this sends 
"fail" response back to the Runner, which may abort job processing depending on 
the runner.
   
   It would be better to send "empty" responses with no sampleData in this case 
instead. 
   ```
   if c.dataSampler != nil {
        return &fnpb.InstructionResponse{
                        InstructionId: string(instID),
                        Response: &fnpb.InstructionResponse_SampleData{},
                }
   }
   ```



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

Reply via email to