accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From keith-turner <...@git.apache.org>
Subject [GitHub] accumulo pull request #254: [ACCUMULO-4506] Add a timeout to the replication...
Date Mon, 01 May 2017 15:11:55 GMT
Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/254#discussion_r114136260
  
    --- Diff: server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
---
    @@ -416,6 +444,12 @@ protected Status replicateLogs(ClientContext peerContext, final HostAndPort
peer
         Status lastStatus = status, currentStatus = status;
         final AtomicReference<Exception> exceptionRef = new AtomicReference<>();
         while (true) {
    +      // Check if the thread has been interrupted prior to replicating data
    +      if (Thread.interrupted()) {
    --- End diff --
    
    In the past I have found that other libraries (like Hadoop) eat interrupts, so it may
never be seen.  I am not sure, but I was wondering if it would it make sense to have an additional
atomic boolean that you set and and check?  I had to do this to reliably interrupt scans in
Accumulo. If there were an AtomicBoolean, could do something like `if(Thread.interrupted()
|| stopped.get())`.


---
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