EventManagerThreadProc deletes wrong number of Events


EventManagerThreadProc (EMTP) calls Event.ReadExtended passing false for the Delete Events argument. Then it delivers the events it read to the application. Finally, it calls Event.Delete to delete the events it read from Groove's event queue. It does this so that if the application should crash trying to handle an event (or the box be powered off) the event will still be persisted on Groove's event queue.
The problem was that EMTP passes ExtendedEventData.EventQueueSummary.Sequence to Event.Delete, but needs to pass ExtendedEventData.EventQueueSummary.Sequence - 1 to correctly delete the events it's read.
You can prove this by comparing the count of events deleted returned by Event.Delete to the count of events read by Event.ExtendedRead. With the original code, these two values occasionally compare inequal - especially if the application processing an event invokes a web service that will generate another event - this event gets lost.
Closed Apr 20, 2007 at 11:55 PM by BobNovas
Fixed in Release 3