unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Inconsistency between tag database and notmuch search
@ 2017-03-17  9:58 Navin Kabra
  2017-03-17 12:37 ` David Bremner
  0 siblings, 1 reply; 5+ messages in thread
From: Navin Kabra @ 2017-03-17  9:58 UTC (permalink / raw)
  To: notmuch


I've managed to get my notmuch tag database in an inconsistent 
state and
can't figure out how to fix it. Because of this I have "unread" 
messages sitting in my inbox permanently and I can't get rid of 
them.

Specifically, I have a few threads/messages that don't have any 
tags,
but still show up in notmuch search for those tags. And using
notmuch tag to remove (or add) any tags on these threads has no 
effect. Doing a `notmuch compact` does not fix this issue.

(I believe I managed to do this by running some notmuch commands 
while a
`xapian-compact` was running in the background.)

Here are some commands that demonstrate the problem:

    ~$ notmuch --version
    notmuch 0.23.5

    ~$ notmuch search thread:0000000000058ca0
    thread:0000000000058ca0  February 22 [1/1] Mandar Joshi; 
    Announcing TiECon Pune 2017 - Pune's largest, most energizing 
    startup event! ()

    ~$ notmuch search thread:0000000000058ca0 and tag:inbox
    thread:0000000000058ca0  February 22 [1/1] Mandar Joshi; 
    Announcing TiECon Pune 2017 - Pune's largest, most energizing 
    startup event! ()

    ~$ notmuch tag -inbox thread:0000000000058ca0 

    ~$ notmuch search thread:0000000000058ca0 
    thread:0000000000058ca0  February 22 [1/1] Mandar Joshi; 
    Announcing TiECon Pune 2017 - Pune's largest, most energizing 
    startup event! ()

    ~$ notmuch tag +inbox thread:0000000000058ca0 

    ~$ notmuch search thread:0000000000058ca0 
    thread:0000000000058ca0  February 22 [1/1] Mandar Joshi; 
    Announcing TiECon Pune 2017 - Pune's largest, most energizing 
    startup event! ()


As you can see from the `()` at the end of the notmuch search 
output, this thread has no tags associated with it. And still, it 
is showing up in the notmuch search output.

What should I do to get rid of these messages from the notmuch 
search output?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Inconsistency between tag database and notmuch search
  2017-03-17  9:58 Inconsistency between tag database and notmuch search Navin Kabra
@ 2017-03-17 12:37 ` David Bremner
  2017-03-20  7:57   ` Navin Kabra
  0 siblings, 1 reply; 5+ messages in thread
From: David Bremner @ 2017-03-17 12:37 UTC (permalink / raw)
  To: Navin Kabra, notmuch

Navin Kabra <navin@smriti.com> writes:

>
> Specifically, I have a few threads/messages that don't have any tags,
> but still show up in notmuch search for those tags. And using notmuch
> tag to remove (or add) any tags on these threads has no effect. Doing
> a `notmuch compact` does not fix this issue.

0) As a first step, run xapian-check, something like

% xapian-check ~/Maildir/.notmuch/xapian

If your database is corrupted, there's not much notmuch can do about it
(except maybe make things worse).  I would think that compact would have
detected any corruption, but you never know.

>
>     ~$ notmuch search thread:0000000000058ca0 and tag:inbox
>     thread:0000000000058ca0  February 22 [1/1] Mandar Joshi; 
>     Announcing TiECon Pune 2017 - Pune's largest, most energizing 
>     startup event! ()

1) Can you also see the problem by looking at individual message-ids?,
   e.g. using notmuch show

2) In particular Does notmuch dump generate the correct output? If so,
   then dump your tags, rebuild your database, and reload the tags is
   one option.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Inconsistency between tag database and notmuch search
  2017-03-17 12:37 ` David Bremner
@ 2017-03-20  7:57   ` Navin Kabra
  2017-03-20  9:59     ` David Bremner
  0 siblings, 1 reply; 5+ messages in thread
From: Navin Kabra @ 2017-03-20  7:57 UTC (permalink / raw)
  To: David Bremner, notmuch

Thanks for the quick response David.

xapian-check reports no problems.

Looking at individual message-ids using notmuch show does not show 
anything different. (In this case, the thread had just one 
message).

notmuch-dump seems to be working as expected, so I will try 
rebuilding my database from the dump in a few days, and report on 
whether that fixed the problem.

In the meantime, would anyone be interested in investigating this 
inconsistency so see if this is a notmuch bug that needs fixing? 
I'd be happy to run any commands and post the output.

thanks,
navin.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Inconsistency between tag database and notmuch search
  2017-03-20  7:57   ` Navin Kabra
@ 2017-03-20  9:59     ` David Bremner
  2017-03-20 10:13       ` Navin Kabra
  0 siblings, 1 reply; 5+ messages in thread
From: David Bremner @ 2017-03-20  9:59 UTC (permalink / raw)
  To: Navin Kabra, notmuch

Navin Kabra <navin@smriti.com> writes:

> In the meantime, would anyone be interested in investigating this 
> inconsistency so see if this is a notmuch bug that needs fixing? 
> I'd be happy to run any commands and post the output.

If you can reproduce the situation, starting from a fresh database,
let us know exactly how. Otherwise it's not really feasible to debug,
IMHO.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Inconsistency between tag database and notmuch search
  2017-03-20  9:59     ` David Bremner
@ 2017-03-20 10:13       ` Navin Kabra
  0 siblings, 0 replies; 5+ messages in thread
From: Navin Kabra @ 2017-03-20 10:13 UTC (permalink / raw)
  To: David Bremner, notmuch

> If you can reproduce the situation, starting from a fresh 
> database,
> let us know exactly how. Otherwise it's not really feasible to 
> debug,
> IMHO.

That's what I feared. 

I'll make one or two attempts to recreate the bug, and post here 
if I succeed. Otherwise, I'll give it up and move on.

Thanks.
navin.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-03-20 10:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-17  9:58 Inconsistency between tag database and notmuch search Navin Kabra
2017-03-17 12:37 ` David Bremner
2017-03-20  7:57   ` Navin Kabra
2017-03-20  9:59     ` David Bremner
2017-03-20 10:13       ` Navin Kabra

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).