accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Owens (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-4716) Do not attempt to cache blocks over max array size
Date Thu, 12 Oct 2017 23:50:00 GMT

    [ https://issues.apache.org/jira/browse/ACCUMULO-4716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16202825#comment-16202825
] 

Mark Owens commented on ACCUMULO-4716:
--------------------------------------

Closed and fix versions updated. Thanks [~ctubbsii]

> Do not attempt to cache blocks over max array size
> --------------------------------------------------
>
>                 Key: ACCUMULO-4716
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-4716
>             Project: Accumulo
>          Issue Type: Bug
>            Reporter: Keith Turner
>            Assignee: Mark Owens
>              Labels: newbie, pull-request-available
>             Fix For: 1.7.4, 1.8.2, 2.0.0
>
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> One might think you could do {{new byte\[Integer.MAX_VALUE\]}} in Java, but as I found
when looking into ACCUMULO-4708 *suprise* you can't.  
> According to the [stack overflow post |https://stackoverflow.com/a/8381338] {{new byte\[Integer.MAX_VALUE
- 8\]}} should be safe.  I was able to do up to {{new byte\[Integer.MAX_VALUE - 2\]}} in my
local testing.
> When Accumulo caches a block it reads it into a byte array.  For example this code in
[CachableBlockFile.java|https://github.com/apache/accumulo/blob/rel/1.8.1/core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java#L345]
does this when {{_currBlock.getRawSize() <= cache.getMaxSize()}}.
> This code should ensure the size is less than {{min( cache.getMaxSize(), MAX_ARRAY_SIZE)}}
inorder to read it into a byte array.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message