Roundup Tracker - Issues


Author rouilj
Recipients rouilj, schlatterbeck
Date 2022-12-25.04:51:13
Message-id <>
In-reply-to <>
Hi Ralf:

In message <>,
Ralf Schlatterbeck writes:
>I've pushed a fix that fixes the sorting issue should there ever
>be two detectors for the same event with the same name and prio.

Should two entries with the same name/prio even be allowed?

Since list.sort() is stable, identical entries will preserve the
original relative order of identical keys, but that's not documented
anywhere that I can see. In fact we don't document that identically
prioritied and named items can be added. Given that it used to cause a
crash, I assume it's not being used.

>But: In my tracker I do not have duplicate detector names.
>In fact I'm currently unable to reproduce the problem.

I assume you're trying to reproduce without the patch.  Do you have
any debugging statements in place that may perturb things?  Also what
version of Python are you running?

I wonder if we should raise an exception when adding an element with
the same name and priority as an existing element. Detecting this at
the source should identify where the duplicates are coming from. This
might expose another bug. I am concerned about the performance issue
but we could add the key (priority, name) to a dict and just compare
the key to determine membership.

Ideally we would detect the issue at time of creation, but wrapping:


in try/except to capture the exception and dump self.list might
provide some clues. I have been looking for changes between python 2
and python 3 that could trigger this but I got nothing.

>Is it possible that under certain circumstances we add detectors twice?

I suggested that as a possibility in my response to your initial
report.  I have no idea how that would happen (intermittently) though.

>Note that this occurred also in the mailgw interface, maybe when
>processing more than one mail this can occur?

Maybe. I assume you are fetching email via imap from cron?



or some other imap mock server be useful for testing?
Date User Action Args
2022-12-25 04:51:14rouiljsetrecipients: + rouilj, schlatterbeck
2022-12-25 04:51:14rouiljlinkissue2551250 messages
2022-12-25 04:51:13rouiljcreate