You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/04/14 18:40:19 UTC

[GitHub] [beam] lostluck commented on a change in pull request #11413: [BEAM-9746] check for 0 length copies from state

lostluck 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_r408354342
 
 

 ##########
 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:
   It could but I like the consistency in handling between the statemgr and datamgr code, hence the no-op/comment only change.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services