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

PIM fails to handle timers when "org.jbpm.timer.disableUnmarshallerRegistration" is set to true #597

Closed
martinweiler opened this issue Oct 2, 2023 · 6 comments
Assignees
Labels
area:engine Related to the runtime engines type:bug Something is behaving unexpectedly

Comments

@martinweiler
Copy link

We are setting -Dorg.jbpm.timer.disableUnmarshallerRegistration=true in order to prevent duplicate timer creation in a multi-node environment. However, this leads to problems with timers during process instance migration. Timers fail to get migrated correctly and once the timers are triggered after the migration, the execution fails with a org.kie.internal.runtime.manager.SessionNotFoundException.

We need a solution that works with PIM and guaranteed correct timer handling in multi-node setup (no duplicates).

@elguardian
Copy link

@martinweiler do we have a stacktrace of what is happening here ?

@elguardian
Copy link

elguardian commented Oct 4, 2023

  • checked that during migration the old timer mapping info row is removed.
  • flag -Dorg.jbpm.timer.disableUnmarshallerRegistration=true that causes problems during ejb timers should be considered obsolete as timer info should have the means to restore the info field without doing the loop just quering the TimerMappingInfo in a multinode env. In the past this was not happening because we were relying on the ejb database implementation of wildfly that refreshes every x seconds.

@elguardian
Copy link

OK. I have a possible explanation for this.

https://github.com/kiegroup/jbpm/blob/main/jbpm-runtime-manager/src/main/java/org/jbpm/runtime/manager/impl/migration/MigrationManager.java#L693-L698

This code requires that the timers are being registered in memory as this flag is set -Dorg.jbpm.timer.disableUnmarshallerRegistration=true the migration process does not load the timers in the system that is being used cause the timer map not being found in the node and therefore not being canceled. As the rest of the system is being migrated the timers fires in the old container causing the session not found.

Funny enough we should see some warnings in the report. What I need to understand is 2 things.

  1. The flag was set before the TimerMappingInfo table or not
  2. that flag should not be needed. this is not logged but the outcome of hte migration report.

@elguardian
Copy link

The suggestion should remove the flag org.jbpm.timer.disableUnmarshallerRegistration=true as this should not be needed anymore with the TimerMappingInfo

@elguardian
Copy link

@elguardian
Copy link

closing this one as not fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:engine Related to the runtime engines type:bug Something is behaving unexpectedly
Projects
None yet
Development

No branches or pull requests

2 participants