You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ja...@apache.org on 2023/06/21 01:01:48 UTC

[pinot] branch master updated: Fix casting when prefetching mmap'd segment larger than 2GB (#10936)

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 <ew...@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-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org