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

Swaminathan Balachandran updated HDDS-12742:
--------------------------------------------
    Summary: Implement pool backed RDBStoreCodecBufferIterator for consistency  
(was: Implement pool backed RDBStoreCodecBufferIterator)

> Implement pool backed RDBStoreCodecBufferIterator for consistency
> -----------------------------------------------------------------
>
>                 Key: HDDS-12742
>                 URL: https://issues.apache.org/jira/browse/HDDS-12742
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: Swaminathan Balachandran
>            Assignee: Swaminathan Balachandran
>            Priority: Major
>              Labels: pull-request-available
>
> Currently when RDBStoreCodecBufferIterator returns a keyValue to a caller the 
> KeyValue may not be consistent and could have been modified when the next() 
> value is invoked from the iterator. The codecBuffer returned from the first 
> call may have been modified and thus also making this entire Iterator 
> implementation not thread safe.
> Moreover RDBStoreAbstractIterator does redundant key & value native calls 
> multiple times, even though the entry is there in the heap memory. This could 
> have mighty implications on the performance since every native call implies a 
> buffer copy between the native buffer to the DirectByteBuffer provided or 
> creating a java heap byte array.
> The proposal here is to have a pool of Buffers and return a reference counted 
> KeyValue to the caller which would be only released when all references to 
> the codec buffers are not released. Even though the next method for the 
> RDBStoreAbstractIterator has to made synchronized but the above proposed 
> changes would give us a huge performance bump up.



--
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