Github user etiennecarriere commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6149#discussion_r195682592
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/core/fs/LimitedConnectionsFileSystem.java
 ---
    @@ -940,7 +932,9 @@ public int read() throws IOException {
                public int read(byte[] b) throws IOException {
                        try {
                                int len = originalStream.read(b);
    -                           fs.inputRateLimiter.ifPresent(limiter -> 
limiter.acquire(len));
    +                           if (len >= 0) {
    --- End diff --
    
    yes :
    + InputStream.read() return number of bytes reads or -1 if end of stream is 
reached . 
    + RateLimiter.acquire(n) only accept positive number (which is logic)



---

Reply via email to