unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: William Pettersson <william@ewpettersson.se>, notmuch@notmuchmail.org
Subject: Re: Python/thaw/freeze: Different references to same message
Date: Mon, 31 Jul 2017 17:20:00 -0400	[thread overview]
Message-ID: <87a83ktibj.fsf@rocinante.cs.unb.ca> (raw)
In-Reply-To: <20170729115850.ojg4uzalfyv7i64t@enigmas>

William Pettersson <william@ewpettersson.se> writes:

> That script (which admittedly is from 6 years ago) freezes messages
> before changing tags. But when changing tags, new searches are often
> run, returning some of the same results. It seems any changes on these
> "inner" messages are lost when the outer messages are thawed, and I'm
> guessing this is because the "inner" and "outer" messages reference
> different objects in memory which point to the same Xapian document.

That sounds likely to be the case. There's no attempt to synchronize
multiple in memory caches of the same xapian document.

> Now If I'm correct in guessing the issue here, I can understand that
> it's not the sort of thing that is fun to fix, so I'm more looking to
> see if my understanding is right. In particular, I'm asking because
> clearly 6 years ago Ben's scripts worked, so maybe I'm just not
> understanding them/notmuch correctly.
>
> If I am right, then I'll just leave out the freezing/thawing. As it
> stands, I'm only adding ~5-10 emails at most each run (which is every 10
> minutes) so performance when adding emails isn't (yet) an issue for me.

You might try begin_atomic / end_atomic instead. These nest properly by
design, although I'm not so confident about the performance impact
(they're not really focussed on performance).

      reply	other threads:[~2017-07-31 21:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-29 11:58 Python/thaw/freeze: Different references to same message William Pettersson
2017-07-31 21:20 ` David Bremner [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

  List information: https://notmuchmail.org/

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

  git send-email \
    --in-reply-to=87a83ktibj.fsf@rocinante.cs.unb.ca \
    --to=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    --cc=william@ewpettersson.se \
    /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.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).