Skip to content

Commit 4fe2fe1

Browse files
authored
Merge pull request #4820 from gchq/gh-4733
#4733 Fix report shutdown error
2 parents f4f74aa + acd5c20 commit 4fe2fe1

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
lines changed

Diff for: stroom-analytics/stroom-analytics-impl/src/main/java/stroom/analytics/impl/ReportExecutor.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,12 @@ boolean process(final ReportDoc reportDoc,
280280
LOGGER.error(e2::getMessage, e2);
281281
}
282282

283-
// Disable future execution.
284-
LOGGER.info(() -> LogUtil.message("Disabling: {}", RuleUtil.getRuleIdentity(reportDoc)));
285-
executionScheduleDao.updateExecutionSchedule(executionSchedule.copy().enabled(false).build());
283+
// Disable future execution if the error was not an interrupted exception.
284+
if (!(e instanceof InterruptedException)) {
285+
// Disable future execution.
286+
LOGGER.info(() -> LogUtil.message("Disabling: {}", RuleUtil.getRuleIdentity(reportDoc)));
287+
executionScheduleDao.updateExecutionSchedule(executionSchedule.copy().enabled(false).build());
288+
}
286289

287290
} finally {
288291
// Record the execution.

Diff for: stroom-query/stroom-query-common/src/main/java/stroom/query/common/v2/ResultStoreManager.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,8 @@ public Boolean destroy(final QueryKey queryKey,
514514
try {
515515
return completableFuture.get();
516516
} catch (final InterruptedException | ExecutionException e) {
517-
throw new RuntimeException(e.getMessage(), e);
517+
LOGGER.debug(e::getMessage, e);
518+
return false;
518519
}
519520
}
520521

Diff for: unreleased_changes/20250317_095831_929__4733.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
* Issue **#4733** : Fix report shutdown error.
2+
3+
4+
```sh
5+
# ********************************************************************************
6+
# Issue title: Report Errored, likely during shutdown
7+
# Issue link: https://github.com/gchq/stroom/issues/4733
8+
# ********************************************************************************
9+
10+
# ONLY the top line will be included as a change entry in the CHANGELOG.
11+
# The entry should be in GitHub flavour markdown and should be written on a SINGLE
12+
# line with no hard breaks. You can have multiple change files for a single GitHub issue.
13+
# The entry should be written in the imperative mood, i.e. 'Fix nasty bug' rather than
14+
# 'Fixed nasty bug'.
15+
#
16+
# Examples of acceptable entries are:
17+
#
18+
#
19+
# * Issue **123** : Fix bug with an associated GitHub issue in this repository
20+
#
21+
# * Issue **namespace/other-repo#456** : Fix bug with an associated GitHub issue in another repository
22+
#
23+
# * Fix bug with no associated GitHub issue.
24+
```

0 commit comments

Comments
 (0)