ID | IEP-7 |
Author | |
Sponsor | |
Created | Nov 14, 2017 |
Status | DRAFT |
// Define the problem to be solved.
// Provide the design of the solution.
We can use the same approach from [1] to control an activity for any system crucial process.
For this, we can introduce two interfaces SystemThread and SystemThreadRegestry.
This interface should specify:
Every implementation of SystemThread should update a lastActivity field on each pass through the main loop. For simplification, it might be a time field.
Interfaces GridWorker and IgniteThread are looked as good candidates to extend this interface.
This interface should specify:
In GridKernalContext.add(GridComponent comp) system threads:
should be registered in systemThreadsList. Every call of checkSystemTread should go through a list of registered system process and check if current time - t.lastActivity() is less than systemThreadTimeOut. If the last activity was too long time ago the method should print a WARNING into a log with t.to_String().
If the processor jumps off and begins executing code out of order or a task freezes and is no longer running, it would still be possible that the heartbeat could be generated. The code could get stuck in the heartbeat function and continually only generate the heartbeat.
[1] https://issues.apache.org/jira/browse/IGNITE-6171
// Describe project risks, such as API or binary compatibility issues, major protocol changes, etc.
// Links to discussions on the devlist, if applicable.
Deadlock Detection And Cluster Protection.