CorruptIndexException

class CorruptIndexException(message: String, val file: String, val offset: Long = -1, cause: Throwable? = null) : IndexException

An index sidecar or the index registry cannot be read as this implementation wrote it.

Separate from CorruptBitmapException although a sidecar is mostly bitmaps, because the two are repaired differently and the message has to say which. A damaged posting list is rebuilt by rescanning one segment; a damaged registry has lost an index definition, which no rescan can recover because nobody wrote it down anywhere else.

The failure also covers a sidecar that decodes perfectly but describes something it cannot be describing — a segment number that disagrees with its own filename, an index id that disagrees with the registry, a maximum sequence that disagrees with the base sidecar. A file copied or renamed into place must not be folded in as if it belonged there.

Constructors

Link copied to clipboard
constructor(message: String, file: String, offset: Long = -1, cause: Throwable? = null)

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard

name of the file that would not read.

Link copied to clipboard
open val message: String?
Link copied to clipboard

byte offset within it, or -1 if no single byte is to blame.