accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmil...@apache.org
Subject [accumulo] branch master updated: Fix some dead logic checks (#1017)
Date Fri, 08 Mar 2019 16:57:18 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new edfdf71  Fix some dead logic checks (#1017)
edfdf71 is described below

commit edfdf7102d48fe1c61877dce741d6a27eec87df0
Author: Mike Miller <mmiller@apache.org>
AuthorDate: Fri Mar 8 11:57:13 2019 -0500

    Fix some dead logic checks (#1017)
---
 .../java/org/apache/accumulo/server/metrics/MetricsConfiguration.java | 3 +--
 .../src/main/java/org/apache/accumulo/master/state/MergeStats.java    | 2 +-
 .../src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java      | 4 ++--
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
b/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
index 094b275..48d1fc2 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsConfiguration.java
@@ -116,8 +116,7 @@ public class MetricsConfiguration {
     if (notFound) {
       if (notFoundCount <= CONFIG_FILE_CHECK_COUNTER) {
         return null;
-      } else if ((notFoundCount > CONFIG_FILE_CHECK_COUNTER)
-          && ((System.currentTimeMillis() - lastCheckTime) > CONFIG_FILE_CHECK_INTERVAL))
{
+      } else if ((System.currentTimeMillis() - lastCheckTime) > CONFIG_FILE_CHECK_INTERVAL)
{
         notFoundCount = 0;
         lastCheckTime = System.currentTimeMillis();
         notFound = false;
diff --git a/server/master/src/main/java/org/apache/accumulo/master/state/MergeStats.java
b/server/master/src/main/java/org/apache/accumulo/master/state/MergeStats.java
index ccbe13a..f5a2636 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/state/MergeStats.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/state/MergeStats.java
@@ -159,7 +159,7 @@ public class MergeStats {
       } else {
         log.info("{} tablets are chopped, {} are offline {}", chopped, unassigned,
             info.getExtent());
-        if (unassigned == total && chopped == needsToBeChopped) {
+        if (unassigned == total) {
           if (verifyMergeConsistency(accumuloClient, master))
             state = MergeState.MERGING;
           else
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
index 2bf3de9..5cc6af2 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/Tablet.java
@@ -2630,13 +2630,13 @@ public class Tablet {
           rebuildReferencedLogs();
         }
 
-        if (numAdded > 0 && numAdded != 1) {
+        if (numAdded > 1) {
           // expect to add all or none
           throw new IllegalArgumentException(
               "Added subset of logs " + extent + " " + more + " " + currentLogs);
         }
 
-        if (numContained > 0 && numContained != 1) {
+        if (numContained > 1) {
           // expect to contain all or none
           throw new IllegalArgumentException(
               "Other logs contained subset of logs " + extent + " " + more + " " + otherLogs);


Mime
View raw message