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

When a task is ready to run and enqueued, mark it as started right away #187

Merged
merged 4 commits into from
Jul 15, 2022

Conversation

niloc132
Copy link
Member

This solves a bug where a task might be enqueued in the executor service
for longer than the stale timeout, so the cache believes that the
running task is in fact stale/canceled, and attempts to cancel it, but
this races against the task actually starting and trying to use the
files it expected to have access to.

Fixes #186

This solves a bug where a task might be enqueued in the executor service
for longer than the stale timeout, so the cache believes that the
running task is in fact stale/canceled, and attempts to cancel it, but
this races against the task actually starting and trying to use the
files it expected to have access to.

Fixes Vertispan#186
@niloc132 niloc132 added bug Something isn't working cache labels Jul 14, 2022
@niloc132 niloc132 requested a review from treblereel July 14, 2022 15:09
@niloc132
Copy link
Member Author

To test this, the stale age and update interval can be sped up by setting these in MAVEN_OPTS:
-Dj2cl.diskcache.max_stale_age=1 -Dj2cl.diskcache.mark_active_update_delay_ms=500

@niloc132 niloc132 added this to the 0.20 milestone Jul 14, 2022
niloc132 added 3 commits July 14, 2022 13:09
This means that a jvm shouldn't be able to race itself for staleness,
but will only race other JVMs, including ones that have already exited.
There is a risk here of one JVM being delayed, or the FS not correctly
reflected "last modified time" between two JVMs - we might need a more
approriate channel with which to communicate.
@niloc132 niloc132 merged commit f1e48c8 into Vertispan:main Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cache
Projects
None yet
Development

Successfully merging this pull request may close these issues.

It isn't possible to build a project with latest snapshot version of plugin
2 participants