unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Ethan Glasser-Camp <ethan.glasser.camp@gmail.com>
To: Austin Clements <amdragon@MIT.EDU>, David Bremner <bremner@debian.org>
Cc: Olly Betts <olly@survex.com>, Notmuch Mail <notmuch@notmuchmail.org>
Subject: Re: More ideas about logging.
Date: Fri, 12 Oct 2012 12:28:36 -0400	[thread overview]
Message-ID: <87y5jbac3v.fsf@betacantrips.com> (raw)
In-Reply-To: <20111216040722.GC12245@mit.edu>

Austin Clements <amdragon@MIT.EDU> writes:

> The trouble with this approach is that the OS doesn't have to flush
> logfile to the disk platters in any particular order relative to the
> updates to Xapian.  So, after someone trips over your plug, you could
> come back with Xapian saying you have 500 log entries when your
> logfile comes back with only 20.  The only way I know of to fix this
> is to fsync after the logfile write, which would obviously have
> performance issues.  But maybe there are cleverer ways?

Sorry to jump in almost a year after the fact, but..

How bad do you think those performance issues are going to be? I don't
see them as prohibitive, even in the case where you write a log entry
for every message being tagged. Xapian's doing an fsync each time we
commit, isn't it? (Or is there some cute trick where it rename()s the
database?)

If, instead of truncating, you replay logged operations, I think you can
get away with just writing log entries for user-level operations (like
"notmuch tag +mytag to:somequery") which could touch a lot of
messages. This would then only require one fsync on the log file before
doing a lot of tag updates.

Ethan

  parent reply	other threads:[~2012-10-12 16:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-16  2:09 More ideas about logging David Bremner
2011-12-16  4:07 ` Austin Clements
2011-12-16 11:56   ` David Bremner
2011-12-18 18:34   ` David Bremner
2011-12-18 20:22     ` Tom Prince
2011-12-20 20:25       ` David Bremner
2012-10-12 16:28   ` Ethan Glasser-Camp [this message]
2011-12-16  7:16 ` Michael Hudson-Doyle
2011-12-16 12:02   ` David Bremner
2011-12-18 21:53     ` Michael Hudson-Doyle

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=87y5jbac3v.fsf@betacantrips.com \
    --to=ethan.glasser.camp@gmail.com \
    --cc=amdragon@MIT.EDU \
    --cc=bremner@debian.org \
    --cc=notmuch@notmuchmail.org \
    --cc=olly@survex.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.
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).