Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
0003340: FileSyncExtractorService sets IG on non file batches
  • Loading branch information
woehrl01 authored and mmichalek committed Dec 27, 2017
1 parent 5b192e5 commit 55d943f
Showing 1 changed file with 25 additions and 0 deletions.
Expand Up @@ -1738,6 +1738,28 @@ protected void updateExtractRequestStatus(ISqlTransaction transaction, long extr
extractId);
}

public boolean CanProcessExtractRequest(ExtractRequest request, CommunicationType communicationType){

boolean isFileExtractor = communicationType == CommunicationType.FILE_XTRCT;

boolean isFileChannel = false;
if(request.getTriggerRouter() == null){
isFileChannel = true;
}else {
Trigger trigger = this.triggerRouterService.getTriggerById(request.getTriggerRouter().getTriggerId());
if(trigger == null){
isFileChannel = true;
}else{
Channel channel = configurationService.getChannel(trigger.getChannelId());
if(channel == null || channel.isFileSyncFlag()){
isFileChannel = true;
}
}
}

return !isFileChannel ^ isFileExtractor;
}

/**
* This is a callback method used by the NodeCommunicationService that extracts an initial load
* in the background.
Expand All @@ -1757,6 +1779,9 @@ public void execute(NodeCommunication nodeCommunication, RemoteNodeStatus status
for (int i = 0; i < requests.size()
&& (System.currentTimeMillis() - ts) <= Constants.LONG_OPERATION_THRESHOLD; i++) {
ExtractRequest request = requests.get(i);
if(!CanProcessExtractRequest(request, nodeCommunication.getCommunicationType())){
continue;
}
Node identity = nodeService.findIdentity();
Node targetNode = nodeService.findNode(nodeCommunication.getNodeId());
log.info(
Expand Down

0 comments on commit 55d943f

Please sign in to comment.