azagrebin commented on a change in pull request #7288: [FLINK-9702] Improvement 
in (de)serialization of keys and values for RocksDB state
URL: https://github.com/apache/flink/pull/7288#discussion_r241453092
 
 

 ##########
 File path: 
flink-core/src/main/java/org/apache/flink/core/memory/DataOutputSerializer.java
 ##########
 @@ -350,6 +352,11 @@ public void write(DataInputView source, int numBytes) 
throws IOException {
                this.position += numBytes;
        }
 
+       public void setPosition(int position) {
+               Preconditions.checkArgument(position >= 0 && position <= 
this.position, "Position out of bounds.");
 
 Review comment:
   should it not be:
   `Preconditions.checkArgument(position >= 0 && position < buffer.length ...)`?

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


With regards,
Apache Git Services

Reply via email to