[ 
https://issues.apache.org/jira/browse/HDFS-2709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13180129#comment-13180129
 ] 

Aaron T. Myers commented on HDFS-2709:
--------------------------------------

bq. What's the if condition for? If those are pre-requisites for the function, 
shouldn't it be a Preconditions.checkState or something?

Changed to an assert. This used to be reasonable when this method was 
exclusively called from the constructor, and so the method was always called.

bq. What's the expected behavior if there are fewer than transactionsToSkip 
txns left in the file? Should specify in the javadoc.

It will throw an exception. Added this to the javadoc.

bq. In TestFileJournalManager, can we add a test which calls getInputStream() 
in the middle of a file and verifies that the first txn is the one we expect?

Yep, added.

bq. The modified TestHASafeMode never sets mockRuntime to override the actual 
Runtime object, so the verification is a no-op

Great catch. Fixed.

bq. Oh, I also had to add the following...

Added to the latest patch.
                
> HA: Appropriately handle error conditions in EditLogTailer
> ----------------------------------------------------------
>
>                 Key: HDFS-2709
>                 URL: https://issues.apache.org/jira/browse/HDFS-2709
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ha, name-node
>    Affects Versions: HA branch (HDFS-1623)
>            Reporter: Todd Lipcon
>            Assignee: Aaron T. Myers
>            Priority: Critical
>         Attachments: HDFS-2709-HDFS-1623.patch, HDFS-2709-HDFS-1623.patch, 
> HDFS-2709-HDFS-1623.patch, HDFS-2709-HDFS-1623.patch, 
> HDFS-2709-HDFS-1623.patch, HDFS-2709-HDFS-1623.patch
>
>
> Currently if the edit log tailer experiences an error replaying edits in the 
> middle of a file, it will go back to retrying from the beginning of the file 
> on the next tailing iteration. This is incorrect since many of the edits will 
> have already been replayed, and not all edits are idempotent.
> Instead, we either need to (a) support reading from the middle of a finalized 
> file (ie skip those edits already applied), or (b) abort the standby if it 
> hits an error while tailing. If "a" isn't simple, let's do "b" for now and 
> come back to 'a' later since this is a rare circumstance and better to abort 
> than be incorrect.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to