keith-turner commented on a change in pull request #1318: Fix #1314 fixes gc thread issue by creating one timed task instance URL: https://github.com/apache/accumulo/pull/1318#discussion_r312555392
########## File path: server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java ########## @@ -90,20 +89,13 @@ * @param useTrash * true to move files to trash rather than delete them */ - GarbageCollectWriteAheadLogs(final AccumuloServerContext context, VolumeManager fs, - boolean useTrash) throws IOException { + GarbageCollectWriteAheadLogs(final AccumuloServerContext context, final VolumeManager fs, + final LiveTServerSet liveServers, boolean useTrash) throws IOException { this.context = context; this.fs = fs; this.useTrash = useTrash; - this.liveServers = new LiveTServerSet(context, new Listener() { - @Override - public void update(LiveTServerSet current, Set<TServerInstance> deleted, - Set<TServerInstance> added) { - log.debug("New tablet servers noticed: " + added); - log.debug("Tablet servers removed: " + deleted); - } - }); - liveServers.startListeningForTabletServerChanges(); + this.liveServers = liveServers; Review comment: Could call `liveServers.scanServers()` here making it more functionally equivalent to the old code. The old code used to call `liveServers.startListeningForTabletServerChanges()` which internally called `scanServers()` and registered a timer to call `scanServers()`. I don't think registering the timer is needed. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services