accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From keith-turner <>
Subject [GitHub] accumulo pull request #254: [ACCUMULO-4506] Add a timeout to the replication...
Date Wed, 03 May 2017 15:50:31 GMT
Github user keith-turner commented on a diff in the pull request:
    --- Diff: server/tserver/src/main/java/org/apache/accumulo/tserver/replication/
    @@ -536,8 +570,21 @@ public ReplicationStats execute(Client client) throws Exception {
           // If we have some edits to send
           if (0 < edits.walEdits.getEditsSize()) {
    +        // Check if we are interrupted before to writing the edits
    +        if (Thread.interrupted()) {
    +          log.debug("Replication work interrupted before writing edits, returning empty
replication stats");
    +          return new ReplicationStats(0L, 0L, 0L);
    +        }
             log.debug("Sending {} edits", edits.walEdits.getEditsSize());
             long entriesReplicated = client.replicateLog(remoteTableId, edits.walEdits, tcreds);
    --- End diff --
    May still need some overall logic.  If there are multiple client/RPC calls, the sum of
them could exceed the replication timeout.  For example if there are three RPC calls and each
takes 9 mins and the replication timeout is 10 min, then it could run for 27 min without timing
    Could possibly set the RPC timeout for each call to replication_timeout - time_consumer_so_far.

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

View raw message