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

ASF GitHub Bot updated HDDS-14242:
----------------------------------
    Labels: pull-request-available  (was: )

> Make RDBStoreAbstractIterator set bounds in ReadOptions for prefix based 
> iteration
> ----------------------------------------------------------------------------------
>
>                 Key: HDDS-14242
>                 URL: https://issues.apache.org/jira/browse/HDDS-14242
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: Swaminathan Balachandran
>            Assignee: Swaminathan Balachandran
>            Priority: Major
>              Labels: pull-request-available
>
> Currently for prefix based iteration, the comparison happens on Java side 
> which is inefficient firstly because this incurs an additional buffer copy 
> cost in each and every call of hasNext on iteration i.e. in case of 
> RDBStoreCodecBufferIterator it is going to be a copy b/w 2 direct byte buffer 
> and in case of RDBStoreByteArrayIterator it is going to be a direct to heap 
> byte array allocation which is expensive.
> Moreover the prefix check is also inefficient on java side and this would be 
> very efficient on c++ since rocksdb internally does a memcmp. 
> The patch aims to set lowerBound and upperBound in readOptions on rocksItr 
> initialize.
> Here the lowerBound is going to be the prefix itself and upperBound is going 
> to be nextHigherByteArray entry. If the prefix is going to have all bytes 
> start with 0xFF or if it is empty then there can be no upper bound for the 
> iterator and lower bound is going to be just and the iteration has to happen 
> beginning from the prefix and iterate till the end of the table.



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