[
https://issues.apache.org/jira/browse/HDDS-11366?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ivan Andika updated HDDS-11366:
-------------------------------
Description:
See: [https://github.com/facebook/rocksdb/wiki/Write-Batch-With-Index]
Currently OM uses WriteBatch which only allows write on the batch. Therefore in
OM Response, we should not call DB#get directly since the latest write for a
particular key might be within the current batch that is yet to be flushed by
the OM double buffer.
We might want to replace WriteBatch with WriteBatchIndex which allows us to
read the latest writes from the write batch only (WriteBatchIndex#getFromBatch)
or also with the DB (WriteBatchIndex#getFromBatchAndDB).
Perhaps WriteBatchIndex remove the need of additional bookeeping in
RDBBatchOperation#opCache by setting overWriteKey flag
was:
See: [https://github.com/facebook/rocksdb/wiki/Write-Batch-With-Index]
Currently OM uses WriteBatch which only allows write on the batch. Therefore in
OM Response, we should not call DB#get directly since the latest write for a
particular key might be within the current batch that is yet to be flushed by
the OM double buffer.
We might want to replace WriteBatch with WriteBatchIndex which allows us to
read the latest writes from the write batch only (WriteBatchIndex#getFromBatch)
or also with the DB (WriteBatchIndex#getFromBatchAndDB).
Perhaps we can also remove the need of additional bookeeping in
RDBBatchOperation#opCache
> Replace WriteBatch with WriteBatchWithIndex
> -------------------------------------------
>
> Key: HDDS-11366
> URL: https://issues.apache.org/jira/browse/HDDS-11366
> Project: Apache Ozone
> Issue Type: New Feature
> Components: OM
> Reporter: Ivan Andika
> Priority: Major
>
> See: [https://github.com/facebook/rocksdb/wiki/Write-Batch-With-Index]
> Currently OM uses WriteBatch which only allows write on the batch. Therefore
> in OM Response, we should not call DB#get directly since the latest write for
> a particular key might be within the current batch that is yet to be flushed
> by the OM double buffer.
> We might want to replace WriteBatch with WriteBatchIndex which allows us to
> read the latest writes from the write batch only
> (WriteBatchIndex#getFromBatch) or also with the DB
> (WriteBatchIndex#getFromBatchAndDB).
> Perhaps WriteBatchIndex remove the need of additional bookeeping in
> RDBBatchOperation#opCache by setting overWriteKey flag
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]