[ 
https://issues.apache.org/jira/browse/HDDS-9549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Krishna Kumar Asawa reassigned HDDS-9549:
-----------------------------------------

    Assignee: Tejaskriya Madhan

> defaultReadBufferCapacity should be int instead of long
> -------------------------------------------------------
>
>                 Key: HDDS-9549
>                 URL: https://issues.apache.org/jira/browse/HDDS-9549
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: Ozone Datanode
>            Reporter: Tsz-wo Sze
>            Assignee: Tejaskriya Madhan
>            Priority: Major
>
> The defaultReadBufferCapacity is long in 
> BlockManagerImpl/FilePerBlockStrategy/FilePerChunkStrategy. However, it is 
> casted to int when it is used as shown below.
> {code:java}
> //BufferUtils.assignByteBuffers
>     for (int i = 0; i < numBuffers - 1; i++) {
>       dataBuffers[i] = ByteBuffer.allocate((int) bufferCapacity);
>       buffersAllocated += bufferCapacity;
>     }
> {code}
> Using long as buffer capacity does NOT work for all the following
>  - Java array
>  - Java ByteBuffer
>  - Protobuf ByteString
>  - Netty ByteBuf
> It does not seem to have a good use case for having a buffer with capacity 
> >=2GB.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to