Skip to content

Commit

Permalink
0003792: Routing bottleneck on long routing runs (fix connection leak)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmichalek committed Apr 15, 2019
1 parent 89d17f9 commit 1a05a3d
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -146,6 +146,10 @@ protected void execute() {
.equals(NonTransactionalBatchAlgorithm.NAME)
|| !symmetricDialect.supportsTransactionId();

processInfo.setStatus(ProcessStatus.QUERYING);
cursor = prepareCursor();
processInfo.setStatus(ProcessStatus.EXTRACTING);

if (transactional) {
executeTransactional(cursor);
} else {
Expand Down Expand Up @@ -182,9 +186,6 @@ protected void executeTransactional(ISqlReadCursor<Data> cursor) throws Exceptio
long maxDataToRoute = context.getChannel().getMaxDataToRoute();
List<Data> peekAheadQueue = new ArrayList<Data>(peekAheadCount);

processInfo.setStatus(ProcessStatus.QUERYING);
cursor = prepareCursor();
processInfo.setStatus(ProcessStatus.EXTRACTING);
boolean moreData = true;
while (dataCount < maxDataToRoute || (lastTransactionId != null)) {
if (moreData && (lastTransactionId != null || peekAheadQueue.size() == 0)) {
Expand Down

0 comments on commit 1a05a3d

Please sign in to comment.