jdswinbank / Comet

A complete VOEvent transport system
http://comet.transientskp.org/
BSD 2-Clause "Simplified" License
23 stars 9 forks source link

Duplicate events recorded #30

Closed jdswinbank closed 10 years ago

jdswinbank commented 10 years ago

When subscribing to multiple brokers which all send the same event, Comet should process the first copy of that event to be received and drop the others. However, sometimes an extra copy slips through. For example:

2014-07-05 11:34:36+0200 [INFO VOEventSubscriber,client] VOEvent ivo://nasa.gsfc.gcn/SWIFT#XRT_Proc_Spec_603488-809 received from IPv4Address(TCP, '209.208.78.170', 8099)
2014-07-05 11:34:36+0200 [INFO VOEventSubscriber,client] VOEvent ivo://nasa.gsfc.gcn/SWIFT#XRT_Proc_Spec_603488-809 received from IPv4Address(TCP, '152.78.192.87', 8099)
2014-07-05 11:34:36+0200 [INFO -] Event rejected (Previously seen by this broker); discarding
2014-07-05 11:34:36+0200 [INFO VOEventSubscriber,client] VOEvent ivo://nasa.gsfc.gcn/SWIFT#XRT_Proc_Spec_603488-809 received from IPv4Address(TCP, '50.116.49.68', 8099)
2014-07-05 11:34:36+0200 [INFO -] Event rejected (Previously seen by this broker); discarding
2014-07-05 11:34:36+0200 [INFO VOEventSubscriber,client] VOEvent ivo://nasa.gsfc.gcn/SWIFT#XRT_Proc_Spec_603488-809 received from IPv4Address(TCP, '152.78.192.87', 8099)
2014-07-05 11:34:36+0200 [INFO VOEventSubscriber,client] VOEvent ivo://nasa.gsfc.gcn/SWIFT#XRT_Proc_Spec_603488-809 received from IPv4Address(TCP, '68.169.57.253', 8099)

Here, the same IVORN is received five times. The event comes in both 1.1 and 2.0 formats, so accepting two copies is legitimate. However, two copies are flagged as duplicate, and three are accepted. One must be a mistake.

jdswinbank commented 10 years ago

This must be due to the way we check events for duplication on receipt, accept them, then handle them, including marking them as received. There's scope for another event to be received and checked before the first has been handled.