how do the different frontends deal with displaying large queries?
Gaute Hope
eg at gaute.vetsj.com
Sun Feb 28 04:32:46 PST 2016
David Bremner writes on February 27, 2016 13:50:
> Gaute Hope <eg at 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
More information about the notmuch
mailing list