vyalamar opened a new pull request, #10227:
URL: https://github.com/apache/ozone/pull/10227

   ## What changed
   
   This change pushes prefix iterator bounds into RocksDB `ReadOptions` for 
`RDBTable` prefix iteration.
   
   Prefix scans now create native iterator bounds:
   
   - lower bound: the requested prefix
   - upper bound: the next lexicographic prefix
   
   The existing Java-side prefix check is retained as a defensive compatibility 
layer.
   
   ## Why
   
   Ozone metadata prefix scans currently seek to the prefix and then rely on 
Java-side filtering to stop once keys no longer match. Supplying native RocksDB 
bounds lets RocksDB constrain the iterator range directly and avoid scanning 
beyond the requested prefix range.
   
   ## Implementation notes
   
   - `ManagedReadOptions` owns optional lower/upper bound slices and closes 
them with the read options lifecycle.
   - `RDBTable` creates bounded read options for prefix iterators and transfers 
ownership to the iterator.
   - Iterator close paths now close the RocksDB iterator before the associated 
read options and bound slices.
   - Prefix upper bounds use the next lexicographic prefix, with the all-`0xFF` 
case falling back to a lower bound only.
   
   ## Testing
   
   - `mvn -pl hadoop-hdds/managed-rocksdb test`
   - `mvn -pl hadoop-hdds/managed-rocksdb -DskipTests clean install`
   - `mvn -pl hadoop-hdds/framework 
-Dtest=TestRDBStoreAbstractIterator,TestRDBStoreByteArrayIterator,TestRDBStoreCodecBufferIterator,TestRDBTableStore,TestTypedTable
 test`
   - `git diff --check`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to