You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by mm...@apache.org on 2022/01/14 14:44:28 UTC

[accumulo] branch main updated: Removed deadcode regarding unused while-loop (#2418)

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 4ce35a7  Removed deadcode regarding unused while-loop (#2418)
4ce35a7 is described below

commit 4ce35a7498fe3d7aca560bb4632ebe751901821d
Author: Filipe Rodrigues <fd...@campus.fct.unl.pt>
AuthorDate: Fri Jan 14 14:43:47 2022 +0000

    Removed deadcode regarding unused while-loop (#2418)
    
    * This PR closes #2355.
    * Removed deadcode regarding an unused while-loop which condition was always false. This condition was evaluated with the value of a variable called 'reservationsBlocked', which was initialized with value 'false' and it was never changed.
---
 .../java/org/apache/accumulo/tserver/tablet/DatafileManager.java | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java
index 1068a86..e6799b8 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/DatafileManager.java
@@ -82,7 +82,6 @@ class DatafileManager {
   private final Map<Long,Set<StoredTabletFile>> scanFileReservations = new HashMap<>();
   private final MapCounter<StoredTabletFile> fileScanReferenceCounts = new MapCounter<>();
   private long nextScanReservationId = 0;
-  private boolean reservationsBlocked = false;
 
   static void rename(VolumeManager fs, Path src, Path dst) throws IOException {
     if (!fs.rename(src, dst)) {
@@ -93,14 +92,6 @@ class DatafileManager {
   Pair<Long,Map<TabletFile,DataFileValue>> reserveFilesForScan() {
     synchronized (tablet) {
 
-      while (reservationsBlocked) {
-        try {
-          tablet.wait(50);
-        } catch (InterruptedException e) {
-          log.warn("{}", e.getMessage(), e);
-        }
-      }
-
       Set<StoredTabletFile> absFilePaths = new HashSet<>(datafileSizes.keySet());
 
       long rid = nextScanReservationId++;