This is an automated email from the ASF dual-hosted git repository.
chungen0126 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 0ef5184106a HDDS-16218. Fix SCM HA log messages that drop values and
stack traces (#11046)
0ef5184106a is described below
commit 0ef5184106ac256af380111cc69c2975e847dec8
Author: rjgoyln <[email protected]>
AuthorDate: Thu Sep 3 19:25:00 2026 +0800
HDDS-16218. Fix SCM HA log messages that drop values and stack traces
(#11046)
---
.../main/java/org/apache/hadoop/hdds/scm/ha/SCMHAManagerImpl.java | 8 ++++----
.../java/org/apache/hadoop/hdds/scm/ha/SCMRatisServerImpl.java | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git
a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAManagerImpl.java
b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAManagerImpl.java
index d78e4a8d526..9163719d695 100644
---
a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAManagerImpl.java
+++
b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMHAManagerImpl.java
@@ -321,8 +321,8 @@ public TermIndex installCheckpoint(Path checkpointLocation,
// this exception. In this way reinitialize can throw exception to
// ratis to handle properly.
LOG.error("Failed to install Snapshot as SCM failed to replace"
- + " DB with downloaded checkpoint. Checkpoint transaction {}", e,
- checkpointTxnInfo.getTransactionIndex());
+ + " DB with downloaded checkpoint. Checkpoint transaction {}",
+ checkpointTxnInfo.getTransactionIndex(), e);
throw e;
}
@@ -341,8 +341,8 @@ public TermIndex installCheckpoint(Path checkpointLocation,
dbBackup =
HAUtils.replaceDBWithCheckpoint(lastAppliedIndex, oldDBLocation,
dbBackup.toPath(), OzoneConsts.SCM_DB_BACKUP_PREFIX);
- LOG.error("Replacing SCM state with Term : {} and Index:",
- termIndex.getTerm(), termIndex.getTerm());
+ LOG.error("Replacing SCM state with Term: {} and Index: {}",
+ termIndex.getTerm(), termIndex.getIndex());
// This is being done to check before stop with old db
// try to reload and then finally terminate and also test has
// assumption for re-verify after corrupt DB loading without
diff --git
a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMRatisServerImpl.java
b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMRatisServerImpl.java
index 94b381ccdd9..fdfbda92b46 100644
---
a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMRatisServerImpl.java
+++
b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMRatisServerImpl.java
@@ -356,7 +356,7 @@ public boolean addSCM(AddSCMRequest request) throws
IOException {
if (raftClientReply.isSuccess()) {
LOG.info("Successfully added new SCM: {}.", request.getScmId());
} else {
- LOG.error("Failed to add new SCM: {}. Ratis reply: {}" +
+ LOG.error("Failed to add new SCM: {}. Ratis reply: {}",
request.getScmId(), raftClientReply);
throw new IOException(raftClientReply.getException());
}
@@ -392,7 +392,7 @@ public boolean removeSCM(RemoveSCMRequest request) throws
IOException {
if (raftClientReply.isSuccess()) {
LOG.info("Successfully removed SCM: {}.", request.getScmId());
} else {
- LOG.error("Failed to remove SCM: {}. Ratis reply: {}" +
+ LOG.error("Failed to remove SCM: {}. Ratis reply: {}",
request.getScmId(), raftClientReply);
throw new IOException(raftClientReply.getException());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]