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

Delay reading from job store on repeated errors #116

Merged
merged 3 commits into from Apr 7, 2017
Merged

Delay reading from job store on repeated errors #116

merged 3 commits into from Apr 7, 2017

Conversation

ghost
Copy link

@ghost ghost commented Mar 28, 2017

Hello,
this change helps with issue #71, which is occasionally causing us some trouble in production.

If it's acceptable, it'd be great if we could also get it backported to the 2.2.x series, so that we don't have to wait until 2.3 is finished.. I don't know how that is done, though..

If it's not acceptable, please let me know of a better approach and I'm happy to change the implementation..

@jhouserizer
Copy link
Contributor

Hi @whilemitja ,

This contribution falls under the conditions described under the heading "Contributions which do require a full Contributor’s License Agreement (CLA)" here: http://www.quartz-scheduler.org/community/contribute.html

We very much appreciate your contribution, and request that you submit a signed agreement.

Thanks!

@ghost
Copy link
Author

ghost commented Mar 31, 2017

CLA submitted..

@pierrel
Copy link

pierrel commented Apr 3, 2017

@jhouserizer any update on this?

@jhouserizer jhouserizer added this to the 2.3.0 milestone Apr 4, 2017
@@ -27,6 +27,8 @@
import org.quartz.SchedulerException;
import org.quartz.Trigger;
import org.quartz.Trigger.CompletedExecutionInstruction;
import org.quartz.impl.jdbcjobstore.JobStoreSupport;
Copy link
Contributor

Choose a reason for hiding this comment

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

The direct dependencies on a given JobStore implementation is running afoul of intended abstraction and isolation of the code organization / design.

I think we need to consider a new abstraction for this fix that doesn't create a direct dependency on JobStoreSupport.

Copy link
Contributor

Choose a reason for hiding this comment

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

What about adding a method to the JobStore interface (which we can do with 2.3.0 - but not 2.2.x) named something like "getAcquireRetryDelay()" and the implementation on JobStoreSupport could return the value of dbRetryInterval, and the implementation on RAMJobStore could return 50 or something small, and etc.

Copy link
Author

Choose a reason for hiding this comment

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

I see it more like an integration-with, rather than dependency-on, but ok, will remove.

interval = 250 * acquiresFailed;
}

if (interval > 5000)
Copy link
Contributor

Choose a reason for hiding this comment

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

If the dbRetryInterval is 15 seconds, this will reduce the delay to 5 seconds. I wonder if we'd prefer to keep the 15 seconds? I understand that in the "else" case above, where 250 is multiplied by aquiresFailed that the interval could get huge, and therefore need to be constrained to a maximum as is being done here, but maybe that should only apply in the "else" case above.

@ghost
Copy link
Author

ghost commented Apr 6, 2017

Ah, now I remember what the initial trigger for pulling in JobStoreSupport was - (at least) one of the tests sets the retry interval to something very small (5 or 50ms), then fails if the test takes too long to finish.. With the new/extra delays, the test indeed took too long, and so I thought it'd be better to take the retry interval into account rather than relaxing the test's time limit..

I see that 2.3.0 release is planned for April 16th, which is fairly soon, so I'll go ahead and add that method you suggested to JobStore..

@jhouserizer
Copy link
Contributor

This looks nice. Thanks again for your contribution!

@petraBlock
Copy link

could this change be backported to the 2.2.x series as this causes us a lot of trouble in production?
or is the 2.3.0 an official stable release? I was a bit puzzled as it is not mentioned at all on the http://www.quartz-scheduler.org site.. furthermore I could not find any release note explaining the changes between 2.2.x and 2.3.0.
thanks.

@dop89
Copy link

dop89 commented Mar 2, 2018

Any update on this? When will version 2.3 be released?

@PraveenSrDeveoloper
Copy link

Hi all,
I was also facing the same issue ,as a Temp solution I have placed this

select 1 from dual
true
false

in .

@sugyanipatnaik
Copy link

Praveen ,

Can you tell me where exactly you did the changes, which file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants