Skip to content

Commit

Permalink
0003406: Improvements for Timeouts related to slow databases
Browse files Browse the repository at this point in the history
- run requeryIfEnoughTimeHasPassed on the background thread.
  • Loading branch information
mmichalek committed Feb 5, 2018
1 parent e6a0ead commit 1fc4bf1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -621,10 +621,10 @@ protected List<OutgoingBatch> extract(final ProcessInfo extractInfo, final Node

channelsProcessed.add(currentBatch.getChannelId());

currentBatch = requeryIfEnoughTimeHasPassed(batchesSelectedAtMs, currentBatch);
final OutgoingBatch extractBatch = currentBatch;
Callable<FutureOutgoingBatch> callable = () -> {
return extractBatch(extractBatch, status, extractInfo, targetNode, dataWriter, mode, activeBatches);
OutgoingBatch refreshedBatch = requeryIfEnoughTimeHasPassed(batchesSelectedAtMs, extractBatch);
return extractBatch(refreshedBatch, status, extractInfo, targetNode, dataWriter, mode, activeBatches);
};

if (status.shouldExtractSkip) {
Expand Down
Expand Up @@ -275,7 +275,7 @@ num.of.ack.retries=5
#
# DatabaseOverridable: true
# Tags: transport
send.ack.keepalive.ms=60000
send.ack.keepalive.ms=30000

# This is the amount of time to wait between trying to send an ACK back to the remote node
# when pulling and loading data.
Expand Down

0 comments on commit 1fc4bf1

Please sign in to comment.