This is an automated email from the ASF dual-hosted git repository.

jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 493d4e5c14 Fix casting when prefetching mmap'd segment larger than 2GB 
(#10936)
493d4e5c14 is described below

commit 493d4e5c1431bfd7d107efe497c9012baa9d67b0
Author: jbewing <ewin...@northeastern.edu>
AuthorDate: Tue Jun 20 21:01:42 2023 -0400

    Fix casting when prefetching mmap'd segment larger than 2GB (#10936)
---
 .../pinot/segment/local/segment/store/SegmentLocalFSDirectory.java    | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/store/SegmentLocalFSDirectory.java
 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/store/SegmentLocalFSDirectory.java
index e2f1a718d9..b5efaa215a 100644
--- 
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/store/SegmentLocalFSDirectory.java
+++ 
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/store/SegmentLocalFSDirectory.java
@@ -332,11 +332,9 @@ public class SegmentLocalFSDirectory extends 
SegmentDirectory {
         PREFETCHED_PAGES.incrementAndGet();
       }
     } else {
-      // pos needs to be long because buffer.size() is 32 bit but
-      // adding 4k can make it go over int size
       for (long pos = 0; pos < buffer.size() && PREFETCHED_PAGES.get() < 
prefetchSlowdownPageLimit;
           pos += PAGE_SIZE_BYTES) {
-        buffer.getByte((int) pos);
+        buffer.getByte(pos);
         PREFETCHED_PAGES.incrementAndGet();
       }
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to