Suvrat1629 commented on code in PR #35942:
URL: https://github.com/apache/beam/pull/35942#discussion_r2297788242


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/WindmillSink.java:
##########
@@ -155,10 +155,12 @@ private <EncodeT> ByteString encode(Coder<EncodeT> coder, 
EncodeT object) throws
     public long add(WindowedValue<T> data) throws IOException {
       ByteString key, value;
       ByteString id = ByteString.EMPTY;
+      stream.toByteStringAndReset();

Review Comment:
   @scwhittle Thanks for the feedback.
   I have updated the fix to wrap `coder.encode` in a try-catch in encode, 
resetting stream on exception and I have reverted add method back to its 
original state. Please take a look.
   
   Thank you



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