rjgoyln opened a new pull request, #11046:
URL: https://github.com/apache/ozone/pull/11046

   ## What changes were proposed in this pull request?
   
   Four log statements in the SCM HA code print something other than what they 
promise, and all of them are on failure paths. The checkpoint-install failure 
line advertises the checkpoint transaction index but shows the exception's text 
in its place, because SLF4J only treats the final argument as a throwable — so 
the index is dropped and that line carries no stack trace of its own. The 
revert path a few lines later never prints an index either: its message has one 
placeholder for two values, so the state SCM fell back to goes unrecorded 
before the process terminates. In `addSCM` and `removeSCM` the SCM id is 
concatenated onto the format string instead of being passed as an argument, 
which leaves the Ratis reply in the slot meant for the id:
   
   ```
   Failed to add new SCM: <ratis reply>. Ratis reply: {}<scmId>
   ```
   
   These paths run only once something has already gone wrong, which is when an 
operator needs the values they omit. Behaviour is unchanged; only the rendered 
messages differ.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-16218
   
   ## How was this patch tested?
   
   `mvn -pl :hdds-server-scm test -Dtest=TestSCMHAManagerImpl` passes (3 tests; 
the class exercises the `addSCM`/`removeSCM` paths), and `checkstyle:check` on 
the module reports no violations. The rendering was verified against 
slf4j-reload4j 2.0.18, the binding Ozone ships: with the exception ahead of the 
index, `MessageFormatter` extracts no throwable, the index appears nowhere and 
no trace is logged; with the order corrected, the index renders and the trace 
is attached. No test asserts any of these strings, so none is added for 
text-only changes.
   
   Generated-by: Claude Code (Claude Opus 5)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to