unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Gaute Hope <eg@gaute.vetsj.com>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: how do the different frontends deal with displaying large queries?
Date: Sun, 28 Feb 2016 12:32:46 +0000	[thread overview]
Message-ID: <1456661143-astroid-1-q87qney5lk-1529@strange> (raw)
In-Reply-To: <877fhq5ncl.fsf@zancas.localnet>

David Bremner writes on February 27, 2016 13:50:
> Gaute Hope <eg@gaute.vetsj.com> writes:
> 
>>
>> While loading the threads, if I make enough modifications to the
>> database while the query is still loading (specifically 1: removing the
>> unread tag from a thread, and 2: adding the unread tag to the same thread)
>> apparently the query is invalidated in some way, and I get a hard crash
>> in `notmuch_tags_get ()`.
>>
>> The thread in question has alreaday been loaded and is displayed.
>>
>> Do you deal with this issue in some way?
>>
> 
> I think we "deal with" it by not leaving the database open very
> long. The query is dumped as s-expr by a seperate process. Or perhaps we
> just aren't doing the same level of concurrent operations, I don't know.

Neither do I, I load the threads in the background. But for a long query
that takes a while. The database is only kept open for the duration it
takes to load the threads in the query.

How long is the db open? Would you notice if it crashed? I'm guessing
the abort is triggered by an Xapian::ModifiedDatabase somewhere.

I am only able to consistently reproduce the error if I change the tags
of a thread not yet loaded, a (somewhat messy) test case is available
here:

https://github.com/gauteh/astroid/blob/ti-stateless-query/test/test_notmuch_standalone.cc

If nothing else, it demonstrates the difficulty of handling these
exceptions in functions that don't yet catch them, since they could
happen along many of the internal steps.

Regards, Gaute


      reply	other threads:[~2016-02-28 12:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-24  6:49 how do the different frontends deal with displaying large queries? Gaute Hope
2016-02-24 17:48 ` David Bremner
2016-02-24 17:55   ` Gaute Hope
2016-02-26 11:50   ` Gaute Hope
2016-02-27 12:50     ` David Bremner
2016-02-28 12:32       ` Gaute Hope [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=1456661143-astroid-1-q87qney5lk-1529@strange \
    --to=eg@gaute.vetsj.com \
    --cc=david@tethera.net \
    --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).