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

[JBPM-10242] Allow the possibility of disabling linear search for removeJob and getTimerByName operations #2441

Merged
merged 5 commits into from
Oct 2, 2024

Conversation

fjtirado
Copy link
Contributor

@fjtirado fjtirado commented Aug 27, 2024

@fjtirado fjtirado requested a review from gmunozfe August 27, 2024 15:11
@gmunozfe
Copy link
Member

jenkins do fdb

Copy link
Member

@gmunozfe gmunozfe left a comment

Choose a reason for hiding this comment

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

Looks good to me, great work @fjtirado !

@krisv krisv requested a review from gmunozfe September 11, 2024 12:02
Copy link
Member

@gmunozfe gmunozfe left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks for your work @krisv , it's a weird scenario and this should make the code more robust by skipping the searching also in case there's no exception caught.

@mareknovotny
Copy link
Member

jenkins do fdb

@fjtirado
Copy link
Contributor Author

jenkins run fdb

Unless explicilty stated with property org.jbpm.ejb.timer.linear.search
@fjtirado
Copy link
Contributor Author

jenkins run fdb

1 similar comment
@fjtirado
Copy link
Contributor Author

fjtirado commented Oct 1, 2024

jenkins run fdb

@fjtirado fjtirado changed the title Try to cancel timer always, and only search if timer cancellation fails [JBPM-10242] Allow the possibility of disabling linear search for removeJob and getTimerByName operations Oct 1, 2024
@fjtirado
Copy link
Contributor Author

fjtirado commented Oct 1, 2024

jenkins run fdb

@fjtirado fjtirado force-pushed the timer_cancel_path branch 4 times, most recently from 77f5bdd to ee5587e Compare October 1, 2024 11:27
@fjtirado fjtirado requested a review from gmunozfe October 1, 2024 11:31
@fjtirado fjtirado force-pushed the timer_cancel_path branch 4 times, most recently from 88b0b04 to 509e6cf Compare October 1, 2024 13:25
Setting org.jbpm.ejb.timer.disable.linear.search and
org.jbpm.ejb.timer.disable.linear.remove to true
@gmunozfe
Copy link
Member

gmunozfe commented Oct 2, 2024

jenkins do fdb

@gmunozfe
Copy link
Member

gmunozfe commented Oct 2, 2024

jenkins do fdb

Copy link
Member

@gmunozfe gmunozfe left a comment

Choose a reason for hiding this comment

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

Looks good to me.
Works like a charm: tested regression scenarios with jbpm-playground tests for timers (complex scenarios) with and without cache and enabling/disabling flags.
Amazing work @fjtirado !

@fjtirado
Copy link
Contributor Author

fjtirado commented Oct 2, 2024

thanks @gmunozfe

@fjtirado fjtirado added backport-7.67.x Generate backport PR for 7.67.x branch backport-7.67.x-blue Generate backport PR for 7.67.x-blue branch labels Oct 2, 2024
@fjtirado fjtirado merged commit 2729f9e into kiegroup:main Oct 2, 2024
5 of 8 checks passed
github-actions bot pushed a commit that referenced this pull request Oct 2, 2024
…oveJob and getTimerByName operations (#2441)

* Try to cancel timer always, and only search if timer cancellation fails

* Skipping list search completely if !searchIfFailed

* [JBPM-10242] Always skipping linear search

Unless explicilty stated with property org.jbpm.ejb.timer.linear.search

* [JBPM-10242] Disable linear search on condition

Setting org.jbpm.ejb.timer.disable.linear.search and
org.jbpm.ejb.timer.disable.linear.remove to true

* [JBPM-10242] Fixing integration tests

---------

Co-authored-by: krisv <[email protected]>
github-actions bot pushed a commit that referenced this pull request Oct 2, 2024
…oveJob and getTimerByName operations (#2441)

* Try to cancel timer always, and only search if timer cancellation fails

* Skipping list search completely if !searchIfFailed

* [JBPM-10242] Always skipping linear search

Unless explicilty stated with property org.jbpm.ejb.timer.linear.search

* [JBPM-10242] Disable linear search on condition

Setting org.jbpm.ejb.timer.disable.linear.search and
org.jbpm.ejb.timer.disable.linear.remove to true

* [JBPM-10242] Fixing integration tests

---------

Co-authored-by: krisv <[email protected]>
@mareknovotny
Copy link
Member

mareknovotny commented Oct 3, 2024

There are compiler errors in backported PRs, are we missing some other commits there?

[2024-10-03T06:46:29.522Z] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project drools-core: Compilation failure: Compilation failure: 
[2024-10-03T06:46:29.522Z] [ERROR] /home/jenkins/workspace/KIE/7.67.x/pullrequest/jbpm-7.67.x.pr/bc/kiegroup_drools/drools-core/src/main/java/org/drools/core/event/ProcessEventSupport.java:[33,33] cannot find symbol
[2024-10-03T06:46:29.522Z] [ERROR]   symbol:   class ProcessDataChangedEvent
[2024-10-03T06:46:29.522Z] [ERROR]   location: package org.kie.api.event.process
[2024-10-03T06:46:29.522Z] [ERROR] /home/jenkins/workspace/KIE/7.67.x/pullrequest/jbpm-7.67.x.pr/bc/kiegroup_drools/drools-core/src/main/java/org/drools/core/event/rule/impl/ProcessDataChangedEventImpl.java:[20,33] cannot find symbol
[2024-10-03T06:46:29.522Z] [ERROR]   symbol:   class ProcessDataChangedEvent
[2024-10-03T06:46:29.522Z] [ERROR]   location: package org.kie.api.event.process
[2024-10-03T06:46:29.522Z] [ERROR] /home/jenkins/workspace/KIE/7.67.x/pullrequest/jbpm-7.67.x.pr/bc/kiegroup_drools/drools-core/src/main/java/org/drools/core/event/rule/impl/ProcessDataChangedEventImpl.java:[24,74] cannot find symbol
[2024-10-03T06:46:29.522Z] [ERROR]   symbol: class ProcessDataChangedEvent
[2024-10-03T06:46:29.522Z] [ERROR] /home/jenkins/workspace/KIE/7.67.x/pullrequest/jbpm-7.67.x.pr/bc/kiegroup_drools/drools-core/src/main/java/org/drools/core/event/ProcessEventSupport.java:[186,19] cannot find symbol
[2024-10-03T06:46:29.522Z] [ERROR]   symbol:   class ProcessDataChangedEvent
[2024-10-03T06:46:29.522Z] [ERROR]   location: class org.drools.core.event.ProcessEventSupport
[2024-10-03T06:46:29.522Z] [ERROR] -> [Help 1]
[2024-10-03T06:46:29.522Z] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project drools-core: Compilation failure
[2024-10-03T06:46:29.522Z]     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
[2024-10-03T06:46:29.522Z]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
[2024-10-03T06:46:29.522Z]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
[2024-10-03T06:46:29.522Z]     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
[2024-10-03T06:46:29.522Z]     at java.lang.reflect.Method.invoke (Method.java:566)
[2024-10-03T06:46:29.522Z]     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
[2024-10-03T06:46:29.522Z]     at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
[2024-10-03T06:46:29.522Z]     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
[2024-10-03T06:46:29.522Z]     at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[2024-10-03T06:46:29.522Z] Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
[2024-10-03T06:46:29.522Z]     at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:1220)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.plugin.compiler.CompilerMojo.execute (CompilerMojo.java:187)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
[2024-10-03T06:46:29.522Z]     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
[2024-10-03T06:46:29.523Z]     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
[2024-10-03T06:46:29.523Z]     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
[2024-10-03T06:46:29.523Z]     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
[2024-10-03T06:46:29.523Z]     at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
[2024-10-03T06:46:29.523Z]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
[2024-10-03T06:46:29.523Z]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
[2024-10-03T06:46:29.523Z]     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
[2024-10-03T06:46:29.523Z]     at java.lang.reflect.Method.invoke (Method.java:566)
[2024-10-03T06:46:29.523Z]     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
[2024-10-03T06:46:29.523Z]     at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
[2024-10-03T06:46:29.523Z]     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
[2024-10-03T06:46:29.523Z]     at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

Please check this @fjtirado @gmunozfe
Close the Backport PRs if this need a manual additional fixes.

gmunozfe pushed a commit to gmunozfe/jbpm that referenced this pull request Oct 9, 2024
…oveJob and getTimerByName operations (kiegroup#2441)

* Try to cancel timer always, and only search if timer cancellation fails

* Skipping list search completely if !searchIfFailed

* [JBPM-10242] Always skipping linear search

Unless explicilty stated with property org.jbpm.ejb.timer.linear.search

* [JBPM-10242] Disable linear search on condition

Setting org.jbpm.ejb.timer.disable.linear.search and
org.jbpm.ejb.timer.disable.linear.remove to true

* [JBPM-10242] Fixing integration tests

---------

Co-authored-by: krisv <[email protected]>
gmunozfe pushed a commit to gmunozfe/jbpm that referenced this pull request Oct 9, 2024
…oveJob and getTimerByName operations (kiegroup#2441)

* Try to cancel timer always, and only search if timer cancellation fails

* Skipping list search completely if !searchIfFailed

* [JBPM-10242] Always skipping linear search

Unless explicilty stated with property org.jbpm.ejb.timer.linear.search

* [JBPM-10242] Disable linear search on condition

Setting org.jbpm.ejb.timer.disable.linear.search and
org.jbpm.ejb.timer.disable.linear.remove to true

* [JBPM-10242] Fixing integration tests

---------

Co-authored-by: krisv <[email protected]>
gmunozfe pushed a commit to gmunozfe/jbpm that referenced this pull request Oct 9, 2024
…oveJob and getTimerByName operations (kiegroup#2441)

* Try to cancel timer always, and only search if timer cancellation fails

* Skipping list search completely if !searchIfFailed

* [JBPM-10242] Always skipping linear search

Unless explicilty stated with property org.jbpm.ejb.timer.linear.search

* [JBPM-10242] Disable linear search on condition

Setting org.jbpm.ejb.timer.disable.linear.search and
org.jbpm.ejb.timer.disable.linear.remove to true

* [JBPM-10242] Fixing integration tests

---------

Co-authored-by: krisv <[email protected]>
gmunozfe pushed a commit to gmunozfe/jbpm that referenced this pull request Oct 10, 2024
…oveJob and getTimerByName operations (kiegroup#2441)

* Try to cancel timer always, and only search if timer cancellation fails

* Skipping list search completely if !searchIfFailed

* [JBPM-10242] Always skipping linear search

Unless explicilty stated with property org.jbpm.ejb.timer.linear.search

* [JBPM-10242] Disable linear search on condition

Setting org.jbpm.ejb.timer.disable.linear.search and
org.jbpm.ejb.timer.disable.linear.remove to true

* [JBPM-10242] Fixing integration tests

---------

Co-authored-by: krisv <[email protected]>
gmunozfe pushed a commit to gmunozfe/jbpm that referenced this pull request Oct 10, 2024
…oveJob and getTimerByName operations (kiegroup#2441)

* Try to cancel timer always, and only search if timer cancellation fails

* Skipping list search completely if !searchIfFailed

* [JBPM-10242] Always skipping linear search

Unless explicilty stated with property org.jbpm.ejb.timer.linear.search

* [JBPM-10242] Disable linear search on condition

Setting org.jbpm.ejb.timer.disable.linear.search and
org.jbpm.ejb.timer.disable.linear.remove to true

* [JBPM-10242] Fixing integration tests

---------

Co-authored-by: krisv <[email protected]>
fjtirado added a commit that referenced this pull request Oct 10, 2024
…oveJob and getTimerByName operations (#2441) (#2444)

* Try to cancel timer always, and only search if timer cancellation fails

* Skipping list search completely if !searchIfFailed

* [JBPM-10242] Always skipping linear search

Unless explicilty stated with property org.jbpm.ejb.timer.linear.search

* [JBPM-10242] Disable linear search on condition

Setting org.jbpm.ejb.timer.disable.linear.search and
org.jbpm.ejb.timer.disable.linear.remove to true

* [JBPM-10242] Fixing integration tests

---------

Co-authored-by: Francisco Javier Tirado Sarti <[email protected]>
Co-authored-by: krisv <[email protected]>
fjtirado added a commit that referenced this pull request Oct 10, 2024
…earch for rem… (#2446)

* Revert "RHPAM-4779: SLA due date value in ProcessInstanceLog table is not upd… (#2396) (#2436)"

This reverts commit 2d8b32b.

* [JBPM-10242] Allow the possibility of disabling linear search for removeJob and getTimerByName operations (#2441)

* Try to cancel timer always, and only search if timer cancellation fails

* Skipping list search completely if !searchIfFailed

* [JBPM-10242] Always skipping linear search

Unless explicilty stated with property org.jbpm.ejb.timer.linear.search

* [JBPM-10242] Disable linear search on condition

Setting org.jbpm.ejb.timer.disable.linear.search and
org.jbpm.ejb.timer.disable.linear.remove to true

* [JBPM-10242] Fixing integration tests

---------

Co-authored-by: krisv <[email protected]>

---------

Co-authored-by: Francisco Javier Tirado Sarti <[email protected]>
Co-authored-by: krisv <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-7.67.x Generate backport PR for 7.67.x branch 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.

4 participants