xuzq created HDFS-15504:
---------------------------
Summary: 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
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]