Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve incremental aggregation error handling #1726

Merged
merged 1 commit into from
May 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -215,17 +215,19 @@ private void dispatchEvent(long startTimeOfNewAggregates, BaseIncrementalValueSt
LOG.debug("Event dispatched by " + this.duration + " incremental executor: " + eventChunk.toString());
}
if (isProcessingExecutor) {
try {
executorService.execute(() -> {
executorService.execute(() -> {
try {
table.addEvents(tableEventChunk, streamEventMap.size());
} catch (Throwable t) {
LOG.error("Exception occurred at siddhi app '" + this.siddhiAppName +
"' when performing table writes of aggregation '" + this.aggregatorName +
"' for duration '" + this.duration + "'. This should be investigated as this " +
"can cause accuracy loss.", t);
} finally {
isProcessFinished.set(true);
});
} catch (Throwable t) {
LOG.error("Exception occurred at siddhi app '" + this.siddhiAppName +
"' when performing table writes of aggregation '" + this.aggregatorName +
"' for duration '" + this.duration + "'. This should be investigated as this " +
"can cause accuracy loss.", t);
}
}
});

}
if (waitUntillprocessFinish) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,6 @@ private static String generateDatabaseQuery(List<ExpressionExecutor> expressionE
.equals(AGG_START_TIMESTAMP_COL)) {
outerSelectColumnJoiner.add(" ? " + SQL_AS + variableExpressionExecutor.getAttribute().getName());
} else if (!variableExpressionExecutor.getAttribute().getName().equals(AGG_EXTERNAL_TIMESTAMP_COL)) {
subSelectT2ColumnJoiner.add(variableExpressionExecutor.getAttribute().getName());
if (groupByColumnNames.contains(variableExpressionExecutor.getAttribute().getName())) {
subSelectT2ColumnJoiner.add(INNER_SELECT_QUERY_REF_T3 + "." +
variableExpressionExecutor.getAttribute().getName() + SQL_AS +
Expand Down