fix: create state only on resource event by csviri · Pull Request #2899 · operator-framework/java-operator-sdk

xstefank

In general we cleanup caches on delete event, so although in practice this probably not causing
issues in theory it can happen that we receive events where there is no related custom resource.
In that case we would create state, what can lead to a memory leak.

Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>

@csviri csviri deleted the drop-event-if-no-cr branch

August 22, 2025 12:57

Donnerbart pushed a commit to Donnerbart/java-operator-sdk that referenced this pull request

Aug 28, 2025
* fix: create state only on resource event

In general we cleanup caches on delete event, so although in practice this probably not causing
issues in theory it can happen that we receive events where there is no related custom resource.
In that case we would create state, what can lead to a memory leak.

Signed-off-by: Attila Mészáros <a_meszaros@apple.com>

xstefank pushed a commit to xstefank/java-operator-sdk that referenced this pull request

Aug 28, 2025
* fix: create state only on resource event

In general we cleanup caches on delete event, so although in practice this probably not causing
issues in theory it can happen that we receive events where there is no related custom resource.
In that case we would create state, what can lead to a memory leak.

Signed-off-by: Attila Mészáros <a_meszaros@apple.com>

dongjoon-hyun added a commit to apache/spark-kubernetes-operator that referenced this pull request

Sep 25, 2025