Skip to content
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

avoid race condition for awaiting signals and process instance completed #2403

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

elguardian
Copy link
Member

}
} catch (org.drools.persistence.api.SessionNotFoundException ex) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to catch org.kie.internal.runtime.manager.SessionNotFoundException in my tests:

ERROR [org.kie.server.services.jbpm.kafka.KafkaServerConsumer] (pool-18-thread-10) Exception deserializing event: org.kie.internal.runtime.manager.SessionNotFoundException: No session found for context 143
        at org.jbpm.runtime.manager.impl.PerProcessInstanceRuntimeManager$PerProcessInstanceInitializer.initKieSession(PerProcessInstanceRuntimeManager.java:584)
        at org.jbpm.runtime.manager.impl.RuntimeEngineImpl.internalGetKieSession(RuntimeEngineImpl.java:169)
        at org.jbpm.runtime.manager.impl.RuntimeEngineImpl.getKieSession(RuntimeEngineImpl.java:76)
        at org.jbpm.runtime.manager.impl.PerProcessInstanceRuntimeManager.signalEvent(PerProcessInstanceRuntimeManager.java:186)
        at org.jbpm.kie.services.impl.ProcessServiceImpl.signalEvent(ProcessServiceImpl.java:383)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added that exception

}
} catch (org.drools.persistence.api.SessionNotFoundException ex) {
logger.warn("Signal event cannot proceed because of session not found exception {} for engine {}", ex.getMessage(), runtimeEngine.getKieSessionId());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this getting logged frequently and think it would be better to have it at DEBUG level.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set to debug

Copy link

sonarcloud bot commented Mar 21, 2024

Copy link
Contributor

@martinweiler martinweiler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @elguardian

@elguardian elguardian merged commit ebefb81 into kiegroup:main Mar 21, 2024
2 of 4 checks passed
@elguardian elguardian added the backport-7.67.x-blue Generate backport PR for 7.67.x-blue branch label Mar 21, 2024
@elguardian elguardian deleted the incubator-kie-issues-1016 branch March 21, 2024 13:11
github-actions bot pushed a commit that referenced this pull request Mar 21, 2024
elguardian added a commit to elguardian/jbpm that referenced this pull request Mar 21, 2024
elguardian added a commit that referenced this pull request Mar 21, 2024
martinweiler pushed a commit that referenced this pull request Mar 22, 2024
… and process instance completed (#2403) (#2405)

Co-authored-by: Enrique <enrique.gonzalez.martinez1@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-7.67.x-blue Generate backport PR for 7.67.x-blue branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants