[
https://issues.apache.org/jira/browse/HDFS-15504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17180231#comment-17180231
]
jianghua zhu edited comment on HDFS-15504 at 8/19/20, 3:13 AM:
---------------------------------------------------------------
[~xuzq_zander] , here should add a unit test. In the code you submit.
was (Author: jianghuazhu):
[~xuzq_zander] , a unit test should be added here.
> Bootstrap failed and return ERR_CODE_LOGS_UNAVAILABLE
> -----------------------------------------------------
>
> Key: HDFS-15504
> URL: https://issues.apache.org/jira/browse/HDFS-15504
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: xuzq
> Priority: Major
> Attachments: HDFS-15504-001.patch
>
>
> Bootstrap failed and return ERR_CODE_LOGS_UNAVAILABLE when
> _*dfs.ha.tail-edits.in-progress=true*_.
>
> The Code like below and throw IOException at *_checkForGaps_* when missed
> edits more than
> _*dfs.ha.tail-edits.qjm.rpc.max-txns*_
> {code:java}
> public Collection<EditLogInputStream> selectInputStreams(long fromTxId,
> long toAtLeastTxId, MetaRecoveryContext recovery, boolean inProgressOk,
> boolean onlyDurableTxns) throws IOException {
> List<EditLogInputStream> streams = new ArrayList<EditLogInputStream>();
> synchronized(journalSetLock) {
> Preconditions.checkState(journalSet.isOpen(), "Cannot call " +
> "selectInputStreams() on closed FSEditLog");
> selectInputStreams(streams, fromTxId, inProgressOk, onlyDurableTxns);
> }
> try {
> checkForGaps(streams, fromTxId, toAtLeastTxId, inProgressOk);
> } catch (IOException e) {
> if (recovery != null) {
> // If recovery mode is enabled, continue loading even if we know we
> // can't load up to toAtLeastTxId.
> LOG.error("Exception while selecting input streams", e);
> } else {
> closeAllStreams(streams);
> throw e;
> }
> }
> return streams;
> }{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]