-
Notifications
You must be signed in to change notification settings - Fork 218
failed invoking InformerEventSource event handler: null: java.lang.NullPointerException #2694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I noticed another occasional failure which seems to be related. This one seems to be causing my tests to actually fail. I tested with the change in PR #2695 to prevent the NPE. With that change both the NPE & ISE went away and my tests passed consistently.
|
Hi @matteriben , thx for reporting, will take a look soon. |
Hi @matteriben , I also added a PR, actually there is no need to remove resource version for SSA, basically that is what we don't want to do if user explicitly sets it. Will dig a bit more if we can also handle more elegantly the edit. Cloning the resource from the cache would solve this, but that is a costly operation. |
@matteriben pls check my PR, in case feel free to test it from that branch, that should fix the issue in general. In the and for non-ssa patch I ended up to cloning the resource, why this might have a slight performance overhead, in no circumstances should be change the resource in the cache, since that can lead to some issues like this reported. This should cover the issue. |
I'm updating to version 5. I ran an existing test that creates many custom resources which need to be reconciled and noticed that I would occasionally see these errors in the logs.
I verified this behavior with both 5.0.1 and 5.0.2. I believe is this caused by a data race between the two points below.
Write
originalResource.getMetadata().setResourceVersion(null)
:java-operator-sdk/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/ReconciliationDispatcher.java
Lines 406 to 428 in 8a37956
Read
resource.getMetadata().getResourceVersion()
:java-operator-sdk/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/MDCUtils.java
Line 36 in 8a37956
The text was updated successfully, but these errors were encountered: