[
https://issues.apache.org/jira/browse/HDDS-14237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Swaminathan Balachandran updated HDDS-14237:
--------------------------------------------
Description: As per rocksdb DirectSlices are supposed to expose the direct
buffers to interact with rocksdb. The only problem with directSlices when
working with external byte buffers it doesn't understand offset and limit of
the ByteBuffer. Hence to make it safe to work just creating a constructor for
ManagedDirectSlice fixing the offset and length of the underlying directSlice
instance should be good. The current implementation doesn't make it safe to
reuse the direct slice multiple times since rocksdb doesn't allow rollbacks of
offset in case we want to use a different offset and limit with the same byte
buffer. (was: As per rocksdb DirectSlices are supposed to expose the direct
buffers to interact with rocksdb. The only problem with directSlices when
working with external byte buffers it doesn't understand offset and limit of
the ByteBuffer. Hence to make it safe to work just creating a constructor for
ManagedDirectSlice fixing the offset and length of the underlying directSlice
instance should be good.)
> Simplify ManagedDirectSlice to use ByteBuffers
> ----------------------------------------------
>
> Key: HDDS-14237
> URL: https://issues.apache.org/jira/browse/HDDS-14237
> Project: Apache Ozone
> Issue Type: Sub-task
> Reporter: Swaminathan Balachandran
> Assignee: Swaminathan Balachandran
> Priority: Major
>
> As per rocksdb DirectSlices are supposed to expose the direct buffers to
> interact with rocksdb. The only problem with directSlices when working with
> external byte buffers it doesn't understand offset and limit of the
> ByteBuffer. Hence to make it safe to work just creating a constructor for
> ManagedDirectSlice fixing the offset and length of the underlying directSlice
> instance should be good. The current implementation doesn't make it safe to
> reuse the direct slice multiple times since rocksdb doesn't allow rollbacks
> of offset in case we want to use a different offset and limit with the same
> byte buffer.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]