Skip to content

Commit

Permalink
0001362: Background initial load extract was allowing the client to s…
Browse files Browse the repository at this point in the history
…tart pulling data for a table that was currently extracting

Added additional logging
  • Loading branch information
chenson42 committed Jul 31, 2013
1 parent 45182d1 commit abf866e
Showing 1 changed file with 11 additions and 1 deletion.
Expand Up @@ -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));
Expand Down Expand Up @@ -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<OutgoingBatch> batches = outgoingBatchService.getOutgoingBatchRange(
request.getStartBatchId(), request.getEndBatchId()).getBatches();
ProcessInfo processInfo = statisticManager.newProcessInfo(new ProcessInfoKey(identity
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit abf866e

Please sign in to comment.