Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359391 - correct job status cleanup nessecary on gyrex shutdown and on scheduler disable
Summary: correct job status cleanup nessecary on gyrex shutdown and on scheduler disable
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: gyrex (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Gunnar Wagenknecht CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-29 05:58 EDT by Andreas Mihm CLA
Modified: 2018-03-19 11:59 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Mihm CLA 2011-09-29 05:58:06 EDT
if gyrex is shutdown, the running jobs get canceled, but their job status still stays hanging on the last status, which blocks further executions of a scheduled job after restart or scheduler enable.

Furthermore the duplicate saving of job status can lead to inconsistent information:

- the job status is kept in the context tree on the job itself and on the nodes for each status, like /gyrex/prefs/cloud/org.eclipse.gyrex.jobs/status/WAITING
- if this two places get out of sync for whatever reasons, its hard to operate the system correctly
Comment 1 Gunnar Wagenknecht CLA 2011-09-29 07:29:01 EDT
A simple "hung" detection has been implemented in bug 356799. The remaining issue is indeed the duplication of status. This has been introduced for performance reasons because there is no efficient way to query for a specific status in the preference tree.
Comment 2 Gunnar Wagenknecht CLA 2011-09-30 16:17:31 EDT
Fixed.

The state node has been removed all together. This makes lookups by state more expensive but it avoids duplication. We may reconsider when lookups actually become a bottleneck. Additionally, the hung detection has been further improved to also discover jobs hung in the WAITING state which are no longer in a queue but already scheduled on a worker.