[ https://issues.apache.org/jira/browse/HDFS-1497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12967464#action_12967464 ]
Hairong Kuang commented on HDFS-1497: ------------------------------------- I like the idea but I am still concerned about this patch. Creating a packet and then decrement the sequence number under a different condition makes me nervous. How about we taking the following approach? In the beginning of hflush, check if bytesCurBlock + buffered data size <= lastFlushOffset. If yes, return. This would avoid creating an unnecessary patch when there is no data to flush. > Write pipeline sequence numbers should be sequential with no skips or > duplicates > -------------------------------------------------------------------------------- > > Key: HDFS-1497 > URL: https://issues.apache.org/jira/browse/HDFS-1497 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs client > Affects Versions: 0.20-append, 0.22.0 > Reporter: Todd Lipcon > Assignee: Todd Lipcon > Attachments: hdfs-1497.txt, hdfs-1497.txt > > > In HDFS-895 we discovered that multiple hflush() calls in a row without > intervening writes could cause a skip in sequence number. This doesn't seem > to have any direct consequences, but we should maintain and assert the > invariant that sequence numbers have no gaps or duplicates. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.