unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Mark Walters <markwalters1009@gmail.com>
To: Peter Wang <novalazy@gmail.com>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH 1/3] cli: add insert --must-index option
Date: Tue, 10 Sep 2013 09:06:00 +0100	[thread overview]
Message-ID: <87hadtxfrr.fsf@qmul.ac.uk> (raw)
In-Reply-To: <20130727151510.GA13750@hili.localdomain>


Hi

>> Do you have a particular use case where indexing is required but tagging
>> is not? For my uses I would prefer failing if either indexing or tagging
>> failed. (My use being postponing messages; If they don't get the
>> postponed tag they could be hard to find)
>
> You're right.
>
> What about a failure to sync tags to maildir flags?

Personally, I wouldn't mind ignoring this failure: it should be
relatively easy to fix after the fact (but others may disagree).

> I now noticed that database modifications aren't flushed until the
> notmuch_database_destroy call (right?), which has no return value and
> failure of which is silently ignored.  That's acceptable in the default
> mode, but with --must-index the failure should be reported (and the
> file deleted).

Yes I think you are right: flushed by notmuch_database_close which is
called by notmuch_database_destroy.

Perhaps the easiest would be to add a notmuch_database_flush with a
return value and then you can call that (and then call
notmuch_database_destroy)? 

Alternatively maybe add notmuch_database_destroy_with_flush or something
which does give a return value. notmuch_database_close is only called 3
times and notmuch_database_destroy lots of times so changing close is
much less intrusive than changing destroy. But I don't know whether we
would break any  bindings or external programs etc.

What do you think?

Best wishes

Mark

  reply	other threads:[~2013-09-10  8:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-21  0:07 [PATCH 1/3] cli: add insert --must-index option Peter Wang
2013-07-21  0:07 ` [PATCH 2/3] man: document insert --must-index Peter Wang
2013-07-21  0:07 ` [PATCH 3/3] test: test " Peter Wang
2013-07-21  8:31 ` [PATCH 1/3] cli: add insert --must-index option Mark Walters
2013-07-27  5:15   ` Peter Wang
2013-09-10  8:06     ` Mark Walters [this message]
2013-09-11 14:13       ` Peter Wang
2013-10-10 10:41         ` David Bremner
2013-10-10 12:30           ` Tomi Ollila
2013-10-10 14:15             ` David Bremner
2013-10-23 19:05               ` Tomi Ollila
2013-10-23 19:32                 ` Austin Clements
2013-10-23 21:34                   ` Tomi Ollila
2013-10-24  0:05                   ` David Bremner
2013-10-24 10:19                     ` Tomi Ollila

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=87hadtxfrr.fsf@qmul.ac.uk \
    --to=markwalters1009@gmail.com \
    --cc=notmuch@notmuchmail.org \
    --cc=novalazy@gmail.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).