On Mon, Jun 5, 2023 at 3:39 PM Célestin Matte <celestin.matte@cmatte.me> wrote:
>
> > How does it even get that far? The code on line 32 of storage.py will
> > check if the message is already in the archives. How does it even get
> > to the point of trying to insert the message again?
>
> Because my patch bypasses this by checking whether the message exists *in the given list*
>
> This was the beginning of an attempt to fix a crash I had. As far as I remember, the crash was that the message
alreadyexisted.
>
> But as said in previous email, this was not sufficient to solve the issue.
OK, I think I need to take a step back to try to figure out what's
actually wrong here.
What is it you are actually trying to accomplish? Are you trying to
remove the single-store functionality for emails? As mentioned, the
whole design of the system is done around that a single email should
only be stored once - but it sounds like you're removing that for some
reason? Or am I misunderstanding?
It sounds to me like your patch that bypasses the check is either
broken or misguided, since that's what actually causes the problem?
> > I'm not sure I like the idea of committing after every message and
> > then rolling back in the event of an error. If nothing else, this
> > should be done using a savepoint instead of a complete transaction.
>
> Attached
--
Magnus Hagander
Me: https://www.hagander.net/
Work: https://www.redpill-linpro.com/