Github user madrob commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/107#discussion_r65654141
  
    --- Diff: 
server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java
 ---
    @@ -410,4 +556,41 @@ static boolean isUUID(String name) {
         }
       }
     
    +  /**
    +   * Determine if TServer has been dead long enough to remove associated 
WALs.
    +   * <p>
    +   * Uses a map where the key is the address and the value is the time 
first seen dead. If the address is not in the map, it is added with the current 
system
    +   * nanoTime. When the passed in wait time has elapsed, this method 
returns true and removes the key and value from the map.
    +   *
    +   * @param address
    +   *          HostAndPort of dead tserver
    +   * @param wait
    +   *          long value of elapsed time to wait
    +   * @return boolean whether enough time elapsed since the server was 
first seen as dead.
    +   */
    +  @VisibleForTesting
    +  protected boolean timeToDelete(HostAndPort address, long wait) {
    +    // check whether the tserver has been dead long enough
    +    Long firstSeen = firstSeenDead.get(address);
    +    if (firstSeen != null) {
    +      long elapsedTime = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - 
firstSeen);
    --- End diff --
    
    Log message claims seconds but code prints millis.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to