unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Daniel Schoepe <daniel@schoepe.org>, notmuch@notmuchmail.org
Subject: Re: [PATCH 3/5] cli/count: add --lastmod
Date: Sat, 15 Aug 2015 12:42:31 +0200	[thread overview]
Message-ID: <87si7kx27c.fsf@maritornes.cs.unb.ca> (raw)
In-Reply-To: <878u9dyq2a.fsf@schoepe.localhost>

Daniel Schoepe <daniel@schoepe.org> writes:

> Sorry to keep harping on this, but I'm not entirely happy with the way
> we handle notmuch-compact here (and in the other commit that mentions
> compacting explicitly). Given that lastmod values (and pretty much
> everything else) aren't affected by compacting, would it perhaps make
> sense to copy the previous UUID to the newly compacted database?

We aren't currently maintaining a UUID for notmuch, but using
Xapian::database::get_uuid(). There is no way in Xapian to change the
UUID; even if there was, lying to Xapian probably would not be a good
idea.

We could maintain our own UUID, but I'm not sure it's worth the extra
code just to make compaction slightly nicer. 

For me compaction is a rare event, so having to take the fallback path
and do a full dump or whatever doesn't seem so bad. If you don't want to
have a fallback path, then I guess you need to guarantee externally that
no "bad changes" happen and either ignore the uuid's or copy them
forward in your external tool.

Mainly though I think this will be fixed in Xapian. As it happens Xapian
developer Olly Betts is here at DebConf, and I discussed this problem
with him. According to Olly, in-progress / future versions of compact
will function in place, and guarantee the UUID is preserved. I'm not
sure of the timeline here, but given our scarce developer resources, I
think I'd rather wait for Olly to fix this.

On the bright side, if in the future we decide that notmuch should have
it's own notion of UUID, then this would would not change the library
API or command line interface.  There is some argument here for giving
our name to the UUID, but "revision" turned out to be a terribly
confusing choice in previous rounds of patches.  The current transparent
naming has the advantage of matching the output.

d

  reply	other threads:[~2015-08-15 10:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-14 16:47 revision tracking patches round 4 David Bremner
2015-08-14 16:47 ` [PATCH 1/5] lib: Add per-message last modification tracking David Bremner
2015-08-14 16:47 ` [PATCH 2/5] lib: API to retrieve database revision and UUID David Bremner
2015-08-14 16:47 ` [PATCH 3/5] cli/count: add --lastmod David Bremner
2015-08-15  7:21   ` Daniel Schoepe
2015-08-15 10:42     ` David Bremner [this message]
2015-08-18 11:32       ` Daniel Schoepe
2015-08-14 16:47 ` [PATCH 4/5] cli: add global option "--uuid" David Bremner
2015-08-14 16:47 ` [PATCH 5/5] lib: Add "lastmod:" queries for filtering by last modification David Bremner
2015-08-20  6:22   ` David Bremner
2015-08-20  7:11     ` Gaute Hope
2015-08-15  8:25 ` revision tracking patches round 4 Tomi Ollila
2015-08-15 15:35   ` David Bremner

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=87si7kx27c.fsf@maritornes.cs.unb.ca \
    --to=david@tethera.net \
    --cc=daniel@schoepe.org \
    --cc=notmuch@notmuchmail.org \
    /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).