[
https://issues.apache.org/jira/browse/HDDS-775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16671500#comment-16671500
]
Nanda kumar commented on HDDS-775:
----------------------------------
Thanks [~msingh] for the patch. +1, looks good to me.
[~linyiqun], thanks for the review. Please find my response below
bq. Looks like this change can also be used for trunk
In trunk the whole container report processing is getting refactored as part of
HDDS-737. I will upload the patch over there shortly.
bq. writeBatch operation should under lock protection. And lock operation
should be moved outside loop.
I agree that this will make the code look cleaner, but having the writeBatch
outside of lock will not cause any correctness issue.
* {{batch}} is a method variable, so there won't be any corruption here even
when multiple threads are accessing.
* Since {{writeBatch}} is rocksdb operation, we can rely on it for correctness
in batch write.
> Batch updates to container db to minimize number of updates.
> ------------------------------------------------------------
>
> Key: HDDS-775
> URL: https://issues.apache.org/jira/browse/HDDS-775
> Project: Hadoop Distributed Data Store
> Issue Type: Bug
> Components: SCM
> Affects Versions: 0.3.0
> Reporter: Mukul Kumar Singh
> Assignee: Mukul Kumar Singh
> Priority: Major
> Attachments: HDDS-775-ozone-0.3.001.patch
>
>
> Currently while processing container reports, each report results in a put
> operation to the db. This can be optimized by replacing put with a batch
> operation.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]