Current situation (Note: Look in the attachments for an image illustrating the working of Timers) There only is one mechanism to fire timer on a replica. That is the reaper thread. As SAS and a ST both have a real expiration time which is used for triggering the timer on the active copy and a wiggledExpiration time which is used for triggering the timer on the replica copy. The wiggledExpiration time will be higher then the actual expiration time. In normal situation the replica should never trigger since the delay between wiggled and actual timer does give the active side a chance to expire and update the replica with a new wiggled expiration time, hence to prevent it from triggering. Cannot resolve external resource into attachment. The wiggledExpiration time is also inherited by any children of the SAS. SInce the expiration times on the replica are checked using periodic reaper thread, the timings on the replica are not as acurate. So the granularity of the reaper (1 minute) should be added to the room the replica timers have in their expiration. When the expiration time is infinite (which can happen for the SAS timer), another mechanism is used. In this case the reactivation is done based on the last accessed time. The object will be re-activated when it has not been accessed for more then 5 hours. A additional delay is added to the expiration of the the children. So in effect the following will happens: SAS - not infinite replica fires at wiggledExpiration time (see figure) THis will result in a load advisory and eventually in the load of the entire tree. SAS - infinite replica fires 5 hours after last accessed This will result in a load advisory and eventually in a save that will update the last accessed time and a load of the entire tree. There might be a problem still that the childrens last accessed time is not updated at this point ST - not infinite Replica fires at wiggledExpirtation time (see figure) This will result in the load advisory and in the load of the ST and the SAS parent. DF/SS - child of not-infinite parent Replica will be removed at wiggledExpiration + 1 minute. The extra 1 minute gives the parent the chance to fire first and update its expiration time and that of its children DF/SS - child of infitite SAS Replica will be removed at 5 hours since last access. There is a problem that in this case there is no additional delay introduced compared to the SAS parent TODO add the figure.
|