You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "WeiLinJin (Jira)" <ji...@apache.org> on 2026/01/05 14:06:00 UTC
[jira] [Created] (HDFS-17869) Missing root exception cause in QuorumJournalManager.doRollback()
WeiLinJin created HDFS-17869:
--------------------------------
Summary: Missing root exception cause in QuorumJournalManager.doRollback()
Key: HDFS-17869
URL: https://issues.apache.org/jira/browse/HDFS-17869
Project: Hadoop HDFS
Issue Type: Bug
Components: namenode
Affects Versions: 3.3.6
Reporter: WeiLinJin
Dear HDFS developers, we are developing a tool to detect exception-related bugs in Java. Our primary focus is on identifying issues where the caught exception is rethrown without propagating the original exception as the cause. When such errors occur, the root cause exception is swallowed, resulting in incomplete call stacks in error reports. This makes it hard to trace the origin of the exception and hinders debugging efforts.
Version: Hadoop-3.3.6
File: org.apache.hadoop.hdfs.qjournal.client.QuorumJournalManager
Line: 257-261 275-279 682-686 699-703 716-720
For example,Line: 257-261:
{code:java}
try {
call.waitFor(loggers.size(), loggers.size(), 0, timeoutMs,
"format");
} catch (InterruptedException e) {
throw new IOException("Interrupted waiting for format() response");//no cause
} catch (TimeoutException e) {
throw new IOException("Timed out waiting for format() response");//no cause
}
{code}
In the code above, when catching the two exceptions and re-throwing a new exception, the caught exceptions are *not passed as the root cause* of the new exception. This makes it hard to trace the source of the original exceptions.
Fix Suggestion:
{code:java}
try {
call.waitFor(loggers.size(), loggers.size(), 0, timeoutMs,
"format");
} catch (InterruptedException e) {
throw new IOException("Interrupted waiting for format() response", e);
} catch (TimeoutException e) {
throw new IOException("Timed out waiting for format() response", e);
}
{code}
There are multiple instances of this issue in the methods of the {{QuorumJournalManager}} class. (Line: 257-261 275-279 682-686 699-703 716-720)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org