unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* "The revision being read has been discarded - you should call Xapian::Database::reopen() and retry the operation"
@ 2016-03-22 17:15 Chris Down
  2016-03-22 20:32 ` David Bremner
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Down @ 2016-03-22 17:15 UTC (permalink / raw)
  To: notmuch

Hey all,

This morning it seems both instances of notmuch-mutt I use (two different 
config files, two different databases) are showing the following error:

> A Xapian exception occurred opening database: The revision being read has 
> been discarded - you should call Xapian::Database::reopen() and retry the 
> operation

This error seems to totally fatal notmuch, since no mail is returned in the 
temporary folder.

There were some package upgrades this morning that seem potentially relevant:

    % pacman -Qi notmuch-mutt | grep Depends
    Depends On      : notmuch-runtime  perl-mailtools  perl-mail-box  perl-term-readline-gnu  perl-string-shellquote  perl-file-which
    % grep 2016-03-22 /var/log/pacman.log | grep -E 'notmuch|perl-mail|perl-term|perl-string|perl-file-which'
    [2016-03-22 09:49] [ALPM] upgraded perl-file-which (1.18-1 -> 1.21-1)
    [2016-03-22 09:49] [ALPM] upgraded perl-term-readline-gnu (1.28-1 -> 1.31-1)

Trying to downgrade these is a no-go, however, because the upgrade this morning 
also upgraded Perl, and the old versions of these scripts refuse to work with 
the new version of Perl (lots of "use of uninitialised value" spam).

After looking around for information about this error, it seems it can also 
mean that the Xapian database is corrupted. Since this is happening on two 
different databases, it seems interesting that the corruption would happen in 
exactly the same way on both. Is there some way to verify the existence or 
non-existence of database corruption in a Xapian database that I could try?

Thanks,

Chris

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

* Re: "The revision being read has been discarded - you should call Xapian::Database::reopen() and retry the operation"
  2016-03-22 17:15 "The revision being read has been discarded - you should call Xapian::Database::reopen() and retry the operation" Chris Down
@ 2016-03-22 20:32 ` David Bremner
  2016-03-22 20:56   ` Chris Down
  0 siblings, 1 reply; 5+ messages in thread
From: David Bremner @ 2016-03-22 20:32 UTC (permalink / raw)
  To: Chris Down, notmuch

Chris Down <chris@chrisdown.name> writes:


> After looking around for information about this error, it seems it can also 
> mean that the Xapian database is corrupted. Since this is happening on two 
> different databases, it seems interesting that the corruption would happen in 
> exactly the same way on both. Is there some way to verify the existence or 
> non-existence of database corruption in a Xapian database that I could try?

You could try running xapian-check $MAILDIR/.notmuch/xapian

It might be a good idea to make a backup with notmuch dump; this is a
read-only operation so it should not make things worse.

d

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

* Re: "The revision being read has been discarded - you should call Xapian::Database::reopen() and retry the operation"
  2016-03-22 20:32 ` David Bremner
@ 2016-03-22 20:56   ` Chris Down
  2016-03-22 22:53     ` David Bremner
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Down @ 2016-03-22 20:56 UTC (permalink / raw)
  To: David Bremner; +Cc: notmuch

David Bremner writes:
>You could try running xapian-check $MAILDIR/.notmuch/xapian

Well, that settles it then:

    % xapian-check Mail/Facebook/.notmuch/xapian
    Database couldn't be opened for reading: DatabaseModifiedError: The revision being read has been discarded - you should call Xapian::Database::reopen() and retry the operation
    Continuing check anyway
    Cross-checking document lengths between the postlist and termlist tables would use more than 1GB of memory, so skipping that check
    record:
    baseB blocksize=8K items=33895 lastblock=97 revision=19845 levels=1 root=97
    B-tree checked okay
    record table structure checked OK

    termlist:
    xapian-check: DatabaseCorruptError: Db block overwritten - are there multiple writers?

>It might be a good idea to make a backup with notmuch dump; this is a
>read-only operation so it should not make things worse.

Seems that that fatals for the same reason:

    % NOTMUCH_CONFIG=.config/notmuch/personal notmuch dump
    A Xapian exception occurred opening database: Db block overwritten - are there multiple writers?

I guess my best bet is to start with a fresh notmuch setup for this maildir?

Thanks for your help, David. I appreciate that. :-)

Chris

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

* Re: "The revision being read has been discarded - you should call Xapian::Database::reopen() and retry the operation"
  2016-03-22 20:56   ` Chris Down
@ 2016-03-22 22:53     ` David Bremner
  2016-03-22 23:11       ` Chris Down
  0 siblings, 1 reply; 5+ messages in thread
From: David Bremner @ 2016-03-22 22:53 UTC (permalink / raw)
  To: Chris Down; +Cc: notmuch

Chris Down <chris@chrisdown.name> writes:

>
> Seems that that fatals for the same reason:
>
>     % NOTMUCH_CONFIG=.config/notmuch/personal notmuch dump
>     A Xapian exception occurred opening database: Db block overwritten - are there multiple writers?
>
> I guess my best bet is to start with a fresh notmuch setup for this maildir?
>
> Thanks for your help, David. I appreciate that. :-)
>
> Chris

Very recent versions of xapian-check (1.3 +? not sure) have an option F to attempt to
repair the database. That's about all I can think of. If you have a lot
of effort in your metadata, you might ask on the xapian user list
<xapian-discuss@lists.xapian.org>.


d

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

* Re: "The revision being read has been discarded - you should call Xapian::Database::reopen() and retry the operation"
  2016-03-22 22:53     ` David Bremner
@ 2016-03-22 23:11       ` Chris Down
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Down @ 2016-03-22 23:11 UTC (permalink / raw)
  To: David Bremner; +Cc: notmuch

David Bremner writes:
>Very recent versions of xapian-check (1.3 +? not sure) have an option F to attempt to
>repair the database. That's about all I can think of. If you have a lot
>of effort in your metadata, you might ask on the xapian user list
><xapian-discuss@lists.xapian.org>.

Yeah, seems the version shipped with arch is still 1.2.22, presumably because 
it's marked as the "stable release". I might just build a newer version from 
source then, thanks for the tip. :-)

    % xapian-check --version
    xapian-check - xapian-core 1.2.22
    % xapian-check -F Mail/Personal/.notmuch/xapian
    option Mail/Personal/.notmuch/xapian unknown
    use t,f,b,v and/or + in the option string

I don't have much (read: any) effort in my metadata, so I guess I'll just 
rebuild from scratch.

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

end of thread, other threads:[~2016-03-22 23:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-22 17:15 "The revision being read has been discarded - you should call Xapian::Database::reopen() and retry the operation" Chris Down
2016-03-22 20:32 ` David Bremner
2016-03-22 20:56   ` Chris Down
2016-03-22 22:53     ` David Bremner
2016-03-22 23:11       ` Chris Down

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