From 1fc4bf112fc21f0d13a86c242f70fa8e55f35509 Mon Sep 17 00:00:00 2001 From: mmichalek Date: Mon, 5 Feb 2018 16:55:14 -0500 Subject: [PATCH] 0003406: Improvements for Timeouts related to slow databases - run requeryIfEnoughTimeHasPassed on the background thread. --- .../jumpmind/symmetric/service/impl/DataExtractorService.java | 4 ++-- .../src/main/resources/symmetric-default.properties | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/DataExtractorService.java b/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/DataExtractorService.java index 4557ed1dea..e4bf6c69d8 100644 --- a/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/DataExtractorService.java +++ b/symmetric-core/src/main/java/org/jumpmind/symmetric/service/impl/DataExtractorService.java @@ -621,10 +621,10 @@ protected List extract(final ProcessInfo extractInfo, final Node channelsProcessed.add(currentBatch.getChannelId()); - currentBatch = requeryIfEnoughTimeHasPassed(batchesSelectedAtMs, currentBatch); final OutgoingBatch extractBatch = currentBatch; Callable 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) { diff --git a/symmetric-core/src/main/resources/symmetric-default.properties b/symmetric-core/src/main/resources/symmetric-default.properties index 9c079a0cfc..d16fa60ff7 100644 --- a/symmetric-core/src/main/resources/symmetric-default.properties +++ b/symmetric-core/src/main/resources/symmetric-default.properties @@ -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.