Yingyi Bu has posted comments on this change.
Change subject: ASTERIXDB-1838 Fix SuperActivityOperatorNodePushable
......................................................................
Patch Set 1:
The following implementation of runInParallel() might be able to fix the issue:
private void runInParallel(OperatorNodePushableAction opAction) throws
HyracksDataException {
List<Future<Void>> initializationTasks = new ArrayList<>();
HyracksDataException exception = null;
int index = 0;
// Run one action for all OperatorNodePushables in parallel through a
thread pool.
for (final IOperatorNodePushable op : operatorNodePushablesBFSOrder) {
final int opIndex = index++;
initializationTasks.add(ctx.getExecutorService().submit(() -> {
opAction.runAction(op, opIndex);
return null;
}));
}
// Waits until all parallel actions to finish.
for (Future<Void> initializationTask : initializationTasks) {
try {
initializationTask.get();
} catch (Exception e) {
if (exception == null) {
exception = HyracksDataException.create(e);
} else {
exception.addSuppressed(e);
}
}
}
if (exception != null) {
throw exception;
}
}
--
To view, visit https://asterix-gerrit.ics.uci.edu/1681
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie5994f8a51dcf43e42325e89215758c310cd7b99
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Michael Blow <[email protected]>
Gerrit-Reviewer: Yingyi Bu <[email protected]>
Gerrit-HasComments: No