pnowojski commented on a change in pull request #6705: [FLINK-10356][network] 
add sanity checks to SpillingAdaptiveSpanningRecordDeserializer
URL: https://github.com/apache/flink/pull/6705#discussion_r227333842
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/serialization/SpillingAdaptiveSpanningRecordDeserializer.java
 ##########
 @@ -137,7 +161,11 @@ else if (remaining == 0) {
                // spanning record case
                if (this.spanningWrapper.hasFullRecord()) {
                        // get the full record
-                       target.read(this.spanningWrapper.getInputView());
+                       try {
+                               
target.read(this.spanningWrapper.getInputView());
+                       } catch (EOFException e) {
+                               
this.spanningWrapper.checkForDeserializationError(e);
 
 Review comment:
   This is hacky. From this place it's unclear whether you are swallowing or 
wrapping the exception. Probably `checkForDeserializationError` is trying to do 
to many things at once.
   
   Maybe try splitting it into `getRemainingBytes` and `throwIOError`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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