On Sun, Mar 29, 2015 at 7:42 PM, Peter Karman <[email protected]> wrote:
> (1) under what conditions would Lucy leave an index with zero-length
> segment and schema files?

I'm having trouble imagining circumstances under which Lucy would produce a
zero-length schema file but a valid, non-zero-length *snapshot* file.  The
only thing I can think of is a power failure or OS crash which results in some
but not all dirty write buffers to be flushed to disk.

Can you confirm that there is a valid snapshot file which references the
zero-length schema file?

If the snapshot file is *also* zero length, I think the main suspect would be
disk filling up.  But I don't know, because that usually would trigger an
exception before the new snapshot file gets moved into place.

This is puzzling.  Maybe there is a bug we don't yet know about.

> (2) is there any way to recover from such a condition? (presumably
>  by re-creating the .schema file)

If the schema file has been obliterated, data has been lost from the index and
the only way to recover is to restore it from an outside source -- such as the
script which writes the index and might have the schema info.

A zero-length segment could potentially be ignored or purged.

A missing or damaged snapshot file is generally not a recoverable event.  The
information on which segments are part of the current snapshot is *only*
stored there.

Marvin Humphrey

Reply via email to