From abf866e6976db9bd4f2b10546371be7f3c6b85e7 Mon Sep 17 00:00:00 2001 From: chenson42 Date: Wed, 31 Jul 2013 14:53:32 +0000 Subject: [PATCH] 0001362: Background initial load extract was allowing the client to start pulling data for a table that was currently extracting Added additional logging --- .../symmetric/service/impl/DataExtractorService.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 c848ec91ba..83c7251e7b 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 @@ -670,7 +670,9 @@ protected OutgoingBatch extractOutgoingBatch(ProcessInfo processInfo, Node targe synchronized (lock) { if (!isPreviouslyExtracted(currentBatch)) { currentBatch.setExtractCount(currentBatch.getExtractCount() + 1); - changeBatchStatus(Status.QY, currentBatch, mode); + if (updateBatchStatistics) { + changeBatchStatus(Status.QY, currentBatch, mode); + } IDataReader dataReader = new ExtractDataReader( symmetricDialect.getPlatform(), new SelectFromSymDataSource( currentBatch, sourceNode, targetNode)); @@ -979,6 +981,10 @@ public void execute(NodeCommunication nodeCommunication, RemoteNodeStatus status Node identity = nodeService.findIdentity(); Node targetNode = nodeService.findNode(nodeCommunication.getNodeId()); ExtractRequest request = requests.get(0); + log.debug( + "Extracting batches for request {}. Starting at batch {}. Ending at batch {}", + new Object[] { request.getRequestId(), request.getStartBatchId(), + request.getEndBatchId() }); List batches = outgoingBatchService.getOutgoingBatchRange( request.getStartBatchId(), request.getEndBatchId()).getBatches(); ProcessInfo processInfo = statisticManager.newProcessInfo(new ProcessInfoKey(identity @@ -1021,6 +1027,10 @@ public void execute(NodeCommunication nodeCommunication, RemoteNodeStatus status } processInfo.setStatus(org.jumpmind.symmetric.model.ProcessInfo.Status.DONE); } catch (RuntimeException ex) { + log.debug( + "Failed to extract batches for request {}. Starting at batch {}. Ending at batch {}", + new Object[] { request.getRequestId(), request.getStartBatchId(), + request.getEndBatchId() }); processInfo.setStatus(org.jumpmind.symmetric.model.ProcessInfo.Status.ERROR); throw ex; }