diff --git a/CHANGELOG.md b/CHANGELOG.md index e0e83201ca7..ed95e0cdc9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ## CHANGELOG +### 6.13.1 (2024-07-02) + +#### Bugs +* Fix #6059: Swallow rejected execution from internal usage of the informer executor + ### 6.13.0 (2024-05-29) #### Bugs diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/ProcessorStore.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/ProcessorStore.java index 647f71e409d..d21fed01e2a 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/ProcessorStore.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/ProcessorStore.java @@ -113,7 +113,7 @@ public void retainAll(Set nextKeys, Consumer cacheStateComplet } }); if (cacheStateComplete != null) { - cacheStateComplete.accept(this.processor::execute); + cacheStateComplete.accept(this.processor::executeIfPossible); } } diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/SharedProcessor.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/SharedProcessor.java index 2de8832c118..55d5ecb0be2 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/SharedProcessor.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/cache/SharedProcessor.java @@ -175,7 +175,11 @@ public ProcessorListener addProcessorListener(ResourceEventHandler } } - public void execute(Runnable runnable) { - this.executor.execute(runnable); + public void executeIfPossible(Runnable runnable) { + try { + this.executor.execute(runnable); + } catch (RejectedExecutionException e) { + // already shutdown + } } }