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

kturner pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/2.1 by this push:
     new 68e040610a fixes tablet update metrics incrementing (#5029)
68e040610a is described below

commit 68e040610aaeb9ac49f5511a3156f30cab748846
Author: Keith Turner <ktur...@apache.org>
AuthorDate: Mon Nov 4 11:16:30 2024 -0500

    fixes tablet update metrics incrementing (#5029)
    
    Some tablet update metrics were incrmenting a counter by zero. Changed
    the increment to one.  Noticed this while working on #4511.
---
 .../java/org/apache/accumulo/tserver/TabletClientHandler.java  | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java
 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java
index 424b399140..4086a8a963 100644
--- 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java
+++ 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletClientHandler.java
@@ -291,7 +291,7 @@ public class TabletClientHandler implements 
TabletClientService.Iface {
           // not serving tablet, so report all mutations as
           // failures
           us.failures.put(keyExtent, 0L);
-          server.updateMetrics.addUnknownTabletErrors(0);
+          server.updateMetrics.addUnknownTabletErrors(1);
         }
       } else {
         log.warn("Denying access to table {} for user {}", 
keyExtent.tableId(), us.getUser());
@@ -299,7 +299,7 @@ public class TabletClientHandler implements 
TabletClientService.Iface {
         us.authTimes.addStat(t2 - t1);
         us.currentTablet = null;
         us.authFailures.put(keyExtent, SecurityErrorCode.PERMISSION_DENIED);
-        server.updateMetrics.addPermissionErrors(0);
+        server.updateMetrics.addPermissionErrors(1);
       }
     } catch (TableNotFoundException tnfe) {
       log.error("Table " + tableId + " not found ", tnfe);
@@ -307,7 +307,7 @@ public class TabletClientHandler implements 
TabletClientService.Iface {
       us.authTimes.addStat(t2 - t1);
       us.currentTablet = null;
       us.authFailures.put(keyExtent, SecurityErrorCode.TABLE_DOESNT_EXIST);
-      server.updateMetrics.addUnknownTabletErrors(0);
+      server.updateMetrics.addUnknownTabletErrors(1);
       return;
     } catch (ThriftSecurityException e) {
       log.error("Denying permission to check user " + us.getUser() + " with 
user " + e.getUser(),
@@ -316,7 +316,7 @@ public class TabletClientHandler implements 
TabletClientService.Iface {
       us.authTimes.addStat(t2 - t1);
       us.currentTablet = null;
       us.authFailures.put(keyExtent, e.getCode());
-      server.updateMetrics.addPermissionErrors(0);
+      server.updateMetrics.addPermissionErrors(1);
       return;
     }
   }
@@ -416,7 +416,7 @@ public class TabletClientHandler implements 
TabletClientService.Iface {
 
               if (!prepared.getViolations().isEmpty()) {
                 us.violations.add(prepared.getViolations());
-                server.updateMetrics.addConstraintViolations(0);
+                server.updateMetrics.addConstraintViolations(1);
               }
               // Use the size of the original mutation list, regardless of how 
many mutations
               // did not violate constraints.

Reply via email to