[
https://issues.apache.org/jira/browse/HDDS-181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16546152#comment-16546152
]
Mukul Kumar Singh commented on HDDS-181:
----------------------------------------
Thanks for working on this issue [~shashikant]. The patch generally looks good
to me. Please find my comment as following
General comments:
1) At this time, let us also raise jira to track keys which are never committed
by client because the client went away. Such keys should be garbage collected.
2) The current patch maintains an in-memory map of the open keys. This
information should be persisted as well to allow the keys to be committed after
a restart.
KeyValueHandler.java:344, The deletion should happen before the lock is
released.
KeyValueHandler.java:412, commitKey internally calls putkey twice, this should
be done only once.
KeyValueHandler.java:493, removeFromKeyMap should be called before the
keyManagerDelete as the keyManager delete will fail for any kind of pending
keys.
KeyValueHandler.java:649, lets add a comment here explaining that as the chunks
are committed as part of putSmallFile, there is no need to maintain these keys
in the openKeyMap.
OpenContainerBlockMap.java: Lets add a constructor to this class.
OpenContainerBlockMap.java: Lets keep the signature of addChunkToMap and
deleteChunkFromMap with blockID first and info as second parameter.
Nits:
Handler.java: 64, more than 80 characters.
KeyData.java:144, typo in removes
KeyData.java: 151-154, misaligned comments
> CloseContainer should commit all pending open Keys on a datanode
> ----------------------------------------------------------------
>
> Key: HDDS-181
> URL: https://issues.apache.org/jira/browse/HDDS-181
> Project: Hadoop Distributed Data Store
> Issue Type: Bug
> Components: Ozone Datanode
> Reporter: Shashikant Banerjee
> Assignee: Shashikant Banerjee
> Priority: Major
> Fix For: 0.2.1
>
> Attachments: HDDS-181.01.patch, HDDS-181.02.patch, HDDS-181.03.patch
>
>
> A close container command arrives in the Datanode by the SCM heartBeat
> response.It will then be queued up over the ratis pipeline. Once the command
> execution starts inside the Datanode, it will mark the container in CLOSING
> State. All the pending open keys for the container now will be committed
> followed by the transition of the container state from CLOSING to CLOSED. For
> achieving this, all the open keys for a container need to be tracked.
> This Jira aims to address this.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]