Skip to content

Commit fa87b0b

Browse files
committed
Avoiding server hanging on close
1 parent 1e15ed3 commit fa87b0b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

x-pack/plugin/deprecation/src/main/java/org/elasticsearch/xpack/deprecation/logging/DeprecationIndexingComponent.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,9 @@ protected void doStop() {
172172

173173
@Override
174174
protected void doClose() {
175-
this.processor.close();
175+
if (requestAndListenerBuffer.isEmpty()) {
176+
this.processor.close();
177+
} // else no point in waiting for the bulk requests to complete because they're never going to
176178
}
177179

178180
public void enableDeprecationLogIndexing(boolean newEnabled) {

0 commit comments

Comments
 (0)