Error classes
A reader reports a bad input as one of two classes. The split matters because it tells the caller whether the data is damaged or merely written by a newer build.
Corrupt
Section titled “Corrupt”Corrupt(what) means the input is malformed or failed authentication. what names the thing that was wrong, for example Corrupt("manifest trailing bytes").
A version number below the minimum, or a bad magic, is also Corrupt. So is arithmetic overflow in a length calculation (SPEC V59).
NewerFormat
Section titled “NewerFormat”NewerFormat{artifact, found, supported} means a version number is above what the build supports. The message is:
<artifact> format <n> is newer than this build supports (<m>); upgrade strata(SPEC V457). Any artifact version above the build’s maximum is NewerFormat. A store whose store_format exceeds the build fails at open before any byte changes (SPEC V456), see Open sequence.
Artifact names
Section titled “Artifact names”These are the artifact names the spec uses with NewerFormat, with the field that holds the number.
| Artifact | Field | Condition |
|---|---|---|
"store" |
MANIFEST header store_format |
greater than the build supports (0 is Corrupt) |
"manifest" |
MANIFEST header manifest_format |
greater than 1 (0 is Corrupt) |
"keyring" |
keyring header version | greater than 1 (a version below 1 is Corrupt) |
"wal segment" |
WAL segment file name format | a format above the build’s (duplicate segment ids are Corrupt, not NewerFormat) |
"sst footer" |
footer version field |
a revision above the build’s highest (5 at the spec commit; revision 0 is Corrupt) |
The five names are those quoted in MANIFEST header, Keyring file, Segments and Footer.