accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joshelser <...@git.apache.org>
Subject [GitHub] accumulo pull request #107: ACCUMULO-4157 Bug fix for removing WALs to quick...
Date Thu, 02 Jun 2016 16:48:28 GMT
Github user joshelser commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/107#discussion_r65576260
  
    --- Diff: server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java
---
    @@ -55,12 +56,16 @@
     import org.apache.zookeeper.KeeperException;
     
     import com.google.common.net.HostAndPort;
    +import java.util.concurrent.TimeUnit;
    +import org.apache.accumulo.core.conf.Property;
     
     public class GarbageCollectWriteAheadLogs {
       private static final Logger log = Logger.getLogger(GarbageCollectWriteAheadLogs.class);
     
       private final Instance instance;
       private final VolumeManager fs;
    +  private final Map<HostAndPort,Long> firstSeenDead = new HashMap<HostAndPort,Long>();
    --- End diff --
    
    No, I don't actually think it's necessary (I haven't looked closely enough), but, at first
glance, it looks like it be necessary. I believe the caller of GCWALs does so in such a way
that it does not have any race conditions.
    
    Re-worded, I think this is probably fine as-is, but some documentation saying "This is
not threadsafe, but the caller is not invoking it in a concurrent manner" would be good for
future devs/readers.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message