thetorpedodog commented on a change in pull request #11413: [BEAM-9746] check 
for 0 length copies from state
URL: https://github.com/apache/beam/pull/11413#discussion_r408284011
 
 

 ##########
 File path: sdks/go/pkg/beam/core/runtime/harness/datamgr.go
 ##########
 @@ -369,11 +371,14 @@ func (r *dataReader) Read(buf []byte) (int, error) {
                r.cur = b
        }
 
+       // We don't need to check for a 0 length copy from r.cur here, since 
that's
+       // checked before buffers are handed to the r.buf channel.
        n := copy(buf, r.cur)
 
-       if len(r.cur) == n {
+       switch {
 
 Review comment:
   seems like this could still be an if-else?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to