all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Mira Limbeck <m.limbeck@proxmox.com>, pmg-devel@lists.proxmox.com
Subject: [pmg-devel] applied: [PATCH log-tracker] fix mutable borrow panic on duplicate msgid
Date: Tue, 11 May 2021 16:16:43 +0200	[thread overview]
Message-ID: <fce65442-b460-2603-3756-d0499ff4985e@proxmox.com> (raw)
In-Reply-To: <20210429132508.29570-1-m.limbeck@proxmox.com>

On 29.04.21 15:25, Mira Limbeck wrote:
> Because of the relay before lmtp issue we now add and remove QEntrys
> based on their message-id. But if the cleanup line containing the
> message-id appears twice in the log for the same QEntry it keeps a weak
> reference to itself which leads to a panic because of a mutable borrow
> while it is already mutably borrowed in the 'finalize' function.
> 
> To circumvent this we check after the lookup if it is the same QEntry
> and if so, insert it again with that message-id in the lookup table and
> don't add the weak reference.
> 
> Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
> ---
>  src/main.rs                                   | 11 ++++-
>  tests/test_input_after_queue_duplicate_msgid  | 20 +++++++++
>  tests/test_output_after_queue_duplicate_msgid | 45 +++++++++++++++++++
>  tests/tests_after_queue.rs                    | 23 ++++++++++
>  4 files changed, 97 insertions(+), 2 deletions(-)
>  create mode 100644 tests/test_input_after_queue_duplicate_msgid
>  create mode 100644 tests/test_output_after_queue_duplicate_msgid
> 
>

applied, with Aarons T-b, thanks!




      parent reply	other threads:[~2021-05-11 14:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29 13:25 [pmg-devel] " Mira Limbeck
2021-04-29 13:38 ` Aaron Lauterer
2021-05-11 14:16 ` Thomas Lamprecht [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fce65442-b460-2603-3756-d0499ff4985e@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=m.limbeck@proxmox.com \
    --cc=pmg-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal