This is an automated email from the ASF dual-hosted git repository.

adoroszlai 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 a17ad8798a4 HDDS-16280. Avoid eager Preconditions message on hot paths 
(#11131)
a17ad8798a4 is described below

commit a17ad8798a455c40af2fb02308fb71ef03a2e21f
Author: NickJavaDev <[email protected]>
AuthorDate: Sat Aug 29 04:43:08 2026 +0800

    HDDS-16280. Avoid eager Preconditions message on hot paths (#11131)
---
 .../src/main/java/org/apache/hadoop/hdds/scm/XceiverClientRatis.java  | 2 +-
 .../java/org/apache/hadoop/ozone/om/snapshot/ReferenceCounted.java    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientRatis.java
 
b/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientRatis.java
index e24e326920c..d946909d547 100644
--- 
a/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientRatis.java
+++ 
b/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientRatis.java
@@ -308,7 +308,7 @@ public CompletableFuture<XceiverClientReply> 
watchForCommit(long index) {
     final CompletableFuture<XceiverClientReply> replyFuture = new 
CompletableFuture<>();
     getClient().async().watch(index, watchType).thenAccept(reply -> {
       final long updated = updateCommitInfosMap(reply, watchType);
-      Preconditions.checkState(updated >= index, "Returned index " + updated + 
" < expected " + index);
+      Preconditions.checkState(updated >= index, "Returned index %s < expected 
%s", updated, index);
       replyFuture.complete(newWatchReply(index, watchType, updated));
     }).exceptionally(e -> {
       LOG.warn("{} way commit failed on pipeline {}", watchType, pipeline, e);
diff --git 
a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/ReferenceCounted.java
 
b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/ReferenceCounted.java
index 6937b5b4e14..ff99a61487d 100644
--- 
a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/ReferenceCounted.java
+++ 
b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/ReferenceCounted.java
@@ -108,8 +108,8 @@ public long decrementRefCount() {
     Preconditions.checkState(threadMap.containsKey(tid),
         "Current thread have not holden reference before");
 
-    Preconditions.checkState(threadMap.get(tid) > 0L, "This thread " + tid +
-        " already have a reference count of zero.");
+    Preconditions.checkState(threadMap.get(tid) > 0L,
+        "This thread %s already have a reference count of zero.", tid);
 
     synchronized (refCountLock) {
       threadMap.computeIfPresent(tid, (k, v) -> {


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

Reply via email to