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

Promptly cleanup updateTask timeout handler #9621

Merged
merged 1 commit into from Feb 10, 2015

Conversation

imotov
Copy link
Contributor

@imotov imotov commented Feb 10, 2015

Improve cleanup of updateTask timeout handlers. The timeout handlers should be removed as soon as a corresponding update task is processed. Otherwise, timeout handlers might keep old updateTasks and all objects that they are pointing to in memory for the duration of timeout (15 minutes by default).

Implementing this for PrioritizedFutureTask is tricky. And since it's not used (nor tested), I am not sure if we should do it for the sake of completeness or it might be cleaner to just remove PrioritizedFutureTask altogether. Thoughts?

if (command instanceof TieBreakingPrioritizedRunnable) {
((TieBreakingPrioritizedRunnable)command).scheduleTimeout(timer, timeoutCallback, timeout);
} else {
// TODO: should we add support or remove PrioritizedFutureTask completely since it's not used?
Copy link
Contributor

Choose a reason for hiding this comment

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

+1 lets get rid of it! If we don't use it there is no need for the complexity!

@s1monw
Copy link
Contributor

s1monw commented Feb 10, 2015

LGTM

@s1monw s1monw added v1.3.8 and removed review labels Feb 10, 2015
@s1monw
Copy link
Contributor

s1monw commented Feb 10, 2015

btw this needs to go into 1.3.8 too

Improve cleanup of updateTask timeout handlers. The timeout handlers should be removed as soon as a corresponding update task is processed. Otherwise, timeout handlers might keep old updateTasks and all objects that they are pointing to in memory for the duration of timeout (15 minutes by default).

Fixes elastic#9621
@imotov imotov merged commit 6544890 into elastic:master Feb 10, 2015
imotov added a commit that referenced this pull request Feb 10, 2015
Improve cleanup of updateTask timeout handlers. The timeout handlers should be removed as soon as a corresponding update task is processed. Otherwise, timeout handlers might keep old updateTasks and all objects that they are pointing to in memory for the duration of timeout (15 minutes by default).

Fixes #9621
imotov added a commit that referenced this pull request Feb 10, 2015
Improve cleanup of updateTask timeout handlers. The timeout handlers should be removed as soon as a corresponding update task is processed. Otherwise, timeout handlers might keep old updateTasks and all objects that they are pointing to in memory for the duration of timeout (15 minutes by default).

Fixes #9621
imotov added a commit that referenced this pull request Feb 10, 2015
Improve cleanup of updateTask timeout handlers. The timeout handlers should be removed as soon as a corresponding update task is processed. Otherwise, timeout handlers might keep old updateTasks and all objects that they are pointing to in memory for the duration of timeout (15 minutes by default).

Fixes #9621
bleskes added a commit that referenced this pull request Feb 12, 2015
This caused by #9671 and #9621 working together and cause an NPE
bleskes added a commit that referenced this pull request Feb 12, 2015
This caused by #9671 and #9621 working together and cause an NPE
bleskes added a commit that referenced this pull request Feb 12, 2015
This caused by #9671 and #9621 working together and cause an NPE
@clintongormley clintongormley changed the title Internal: promptly cleanup updateTask timeout handler Promptly cleanup updateTask timeout handler Jun 7, 2015
mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015
Improve cleanup of updateTask timeout handlers. The timeout handlers should be removed as soon as a corresponding update task is processed. Otherwise, timeout handlers might keep old updateTasks and all objects that they are pointing to in memory for the duration of timeout (15 minutes by default).

Fixes elastic#9621
mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015
mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015
Improve cleanup of updateTask timeout handlers. The timeout handlers should be removed as soon as a corresponding update task is processed. Otherwise, timeout handlers might keep old updateTasks and all objects that they are pointing to in memory for the duration of timeout (15 minutes by default).

Fixes elastic#9621
@imotov imotov deleted the fix-timeout-handling branch May 1, 2020 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants