lucy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From goran kent <gorank...@gmail.com>
Subject Re: [lucy-user] Index state during merges
Date Thu, 03 Nov 2011 07:16:57 GMT
On Wed, Nov 2, 2011 at 9:03 PM, goran kent <gorankent@gmail.com> wrote:
> Lucy::Index::Indexer->new failed (Failed to read seg_2
> S_try_open_elements at
> /home/projects/lucy/lucy/perl/../core/Lucy/Index/PolyReader.c line 251
>
> If I inspect the index it looks like the seg_2 folder is empty.
>
> /.../snapshot_2.json contains
> {
>  "entries": [
>    "schema_2.json",
>    "seg_1",
>    "seg_2"
>  ],
>  "format": "2",
>  "subformat": "1"
> }
>
> and there's a schema_2.json file.  Also, the locks/write.lock is
> present indicating things ended badly.
>
> I'll investigate what caused the in situ index update failure later
> (probably a bad source index :P), but what interests me know is a
> recovery procedure for these kinds of failures.
>
> Is it ok to remove the seg_2 folder and lockfile and rename
> snapshot_2.json to snapshot_1.json and likewise with schema_2.json ->
> schema_1.json?

Since USAians are unreasonably sleeping at the mo', I decided to go
ahead and edit the files and see what happens:

Removed:
locks/write.lock
seg_2/

Renamed:
schema_2.json -> schema_1.json
snapshot_2.json -> snapshot_1.json

Edited:
/master_indexstore/21/796/snapshot_1.json from:
{
  "entries": [
    "schema_2.json",
    "seg_1",
    "seg_2"
  ],
  "format": "2",
  "subformat": "1"
}

to

{
  "entries": [
    "schema_1.json",
    "seg_1"
  ],
  "format": "2",
  "subformat": "1"
}

and all seems to be ok again.  At least, a search on the index returns
results, that being the only way to check if the index is sane...
(lisc - lucy-index-system-check anyone?)

btw, lucy designers, thank you for using human-readable-editable
files, it is the UNIX way.

bye-bye

Mime
View raw message