File tree 2 files changed +33
-4
lines changed
stroom-search/stroom-search-impl/src/main/java/stroom/search/impl
2 files changed +33
-4
lines changed Original file line number Diff line number Diff line change @@ -108,19 +108,24 @@ public Boolean start(final NodeSearchTask nodeSearchTask) {
108
108
// Tell the coprocessors they can complete now as we won't be receiving
109
109
// payloads.
110
110
LOGGER .trace (() -> "Search is complete, setting searchComplete to true and " +
111
- "counting down searchCompleteLatch" );
111
+ "counting down searchCompleteLatch" );
112
112
coprocessors .getCompletionState ().signalComplete ();
113
113
114
114
// Wait for the coprocessors to actually complete, i.e. consume last items from
115
- // the queue and send laST payloads etc.
116
- while (!coprocessors .getCompletionState ().awaitCompletion (1 ,
117
- TimeUnit .SECONDS )) {
115
+ // the queue and send last payloads etc.
116
+ while (!taskContext .isTerminated () &&
117
+ !coprocessors .getCompletionState ().awaitCompletion (1 ,
118
+ TimeUnit .SECONDS )) {
118
119
nodeSearchTaskHandler .updateInfo ();
119
120
}
121
+
120
122
} catch (final InterruptedException e ) {
121
123
LOGGER .trace (e ::getMessage , e );
122
124
// Keep interrupting this thread.
123
125
Thread .currentThread ().interrupt ();
126
+
127
+ } finally {
128
+ coprocessors .clear ();
124
129
}
125
130
}
126
131
});
Original file line number Diff line number Diff line change
1
+ * Issue ** #4829 ** : Fix stuck searches.
2
+
3
+
4
+ ``` sh
5
+ # ********************************************************************************
6
+ # Issue title: Search preventing shutdown / long running task: 7.8 and 7.9
7
+ # Issue link: https://github.com/gchq/stroom/issues/4829
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
+ ```
You can’t perform that action at this time.
0 commit comments