[ https://issues.apache.org/jira/browse/HDFS-12235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16151296#comment-16151296 ]
Chen Liang commented on HDFS-12235: ----------------------------------- Thanks [~yuanbo] for the patch, looks good to me overall, some comments: in {{BlockManagerImpl.java}} deleteBlocks - seems to silently handles the exception when deleteBlockLog.addTransactions went wrong. By which I mean, the rollback gets done and messages get logged, but the caller of the function seems to have no clue to know whether this delete is done, or exception happened and things got rolled back, in which case delete is not done. Maybe throw the exception after the rollback is done? - the writeBatch(rollbackBatch) may throw IOException and fail, in which case rollback failed…not sure whether there is even a way to handle such rollback failure at all…but maybe we should at least log a LOG.error message or something here… - This may not be a valid case, but since deleteBlocks does not have synchronized, I wonder is it possible to have multiple threads doing deletion here? if yes, then is there any chance multiple threads trying to delete same blockID? (e.g. two duplicate key deletion gets to the server at the same time) will we potentially run into any issue? (e.g. any issue if two threads run into exactly same blockStore.writeBatch(batch); call?) - some TODO comments get removed, it appears to me some of them are still things to be done in the future? in {{KeyManagerImpl.java}} deletePendingDeletionKey {code} byte[] pendingDelKey = DFSUtil.string2Bytes(objectKeyName); if (pendingDelKey == null) { throw new IOException("Failed to delete key " + objectKeyName + " because it is not found in DB"); } {code} it says “not found in DB” but this does not seem to be reading DB but checking the key bytes? is it missing a db.get() call or something? > Ozone: DeleteKey-3: KSM SCM block deletion message and ACK interactions > ----------------------------------------------------------------------- > > Key: HDFS-12235 > URL: https://issues.apache.org/jira/browse/HDFS-12235 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: ozone > Affects Versions: HDFS-7240 > Reporter: Weiwei Yang > Assignee: Weiwei Yang > Attachments: HDFS-12235-HDFS-7240.001.patch, > HDFS-12235-HDFS-7240.002.patch, HDFS-12235-HDFS-7240.003.patch, > HDFS-12235-HDFS-7240.004.patch, HDFS-12235-HDFS-7240.005.patch > > > KSM and SCM interaction for delete key operation, both KSM and SCM stores key > state info in a backlog, KSM needs to scan this log and send block-deletion > command to SCM, once SCM is fully aware of the message, KSM removes the key > completely from namespace. See more from the design doc under HDFS-11922, > this is task break down 2. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org