Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #65 from woehrl01/files_table_reload_fix
0003363: Do not extract files if unrelated table reload request is processed
  • Loading branch information
mmichalek committed Apr 9, 2018
2 parents 3d40b99 + 1779b3e commit d730caf
Showing 1 changed file with 8 additions and 3 deletions.
Expand Up @@ -496,9 +496,10 @@ public void insertReloadEvents(Node targetNode, boolean reverse, List<TableReloa
triggerHistories, triggerRoutersByHistoryId,
mapReloadRequests, isFullLoad, symNodeSecurityReloadChannel);

insertFileSyncBatchForReload(targetNode, loadId, createBy, transactional,
transaction, mapReloadRequests, isFullLoad, processInfo);

if (isFullLoad) {
insertFileSyncBatchForReload(targetNode, loadId, createBy, transactional,
transaction, processInfo);

callReloadListeners(false, targetNode, transactional, transaction, loadId);
if (!reverse) {
Expand Down Expand Up @@ -984,7 +985,7 @@ protected int getTransformMultiplier(Table table, TriggerRouter triggerRouter) {
}

private void insertFileSyncBatchForReload(Node targetNode, long loadId, String createBy,
boolean transactional, ISqlTransaction transaction, ProcessInfo processInfo) {
boolean transactional, ISqlTransaction transaction, Map<String, TableReloadRequest> reloadRequests, boolean isFullLoad, ProcessInfo processInfo) {
if (parameterService.is(ParameterConstants.FILE_SYNC_ENABLE)
&& !Constants.DEPLOYMENT_TYPE_REST.equals(targetNode.getDeploymentType())) {
ITriggerRouterService triggerRouterService = engine.getTriggerRouterService();
Expand All @@ -999,6 +1000,10 @@ private void insertFileSyncBatchForReload(Node targetNode, long loadId, String c
TriggerRouter fileSyncSnapshotTriggerRouter = triggerRouterService
.getTriggerRouterForCurrentNode(fileSyncSnapshotHistory.getTriggerId(),
routerid, true);

if(!isFullLoad && reloadRequests != null && reloadRequests.get(fileSyncSnapshotTriggerRouter.getTriggerId() + fileSyncSnapshotTriggerRouter.getRouterId()) == null){
return;
}

List<TriggerHistory> triggerHistories = Arrays.asList(fileSyncSnapshotHistory);
List<TriggerRouter> triggerRouters = Arrays.asList(fileSyncSnapshotTriggerRouter);
Expand Down

0 comments on commit d730caf

Please sign in to comment.