Upper.V3
entry_offset_at_upgrade_to_v3
is the offset of the first entry that is known to have been created using irmin_pack_version = `V2
or more. The entries before that point may be v1 entries. V1 entries need an entry in index because it is the only place their lenght is stored.
val from_v1_v2_post_upgrade_t : from_v1_v2_post_upgrade Irmin.Type.t
suffix_start_offset
is 0 if the suffix file was never garbage collected. Otherwise it is the offset of the very first entry of the suffix file. Note that offsets in the suffix file are virtual. The garbage collections don't reset the offsets.
generation
is the number of past GCs. A suffix file, a prefix file and a mapping containing that integer in their filename exist.
val from_v3_gced_t : from_v3_gced Irmin.Type.t
type status =
| From_v1_v2_post_upgrade of from_v1_v2_post_upgrade
| From_v3_no_gc_yet
| From_v3_used_non_minimal_indexing_strategy
| From_v3_gced of from_v3_gced
| T1
| T2
| T3
| T4
| T5
| T6
| T7
| T8
| T9
| T10
| T11
| T12
| T13
| T14
| T15
From_v1_v2_post_upgrade
corresponds to a pack store that was upgraded to `V3
. It contains infos related to backward compatibility. GCs are forbidden on it.
From_v3_no_gc_yet
corresponds to a pack store that was created using `V3
code. It never underwent a GC.
From_v3_used_non_minimal_indexing_strategy
corresponds to a pack store that was created using `V3
code. It never underwent a GC and it will never be possible to GC it because entries were pushed using a non-minimal indexing strategy.
From_v3_gced
is a store that was GCed at least once.
The T*
tags are provisional tags that the binary decoder is aware of and that may in the future be used to add features to the `V3
payload.
val status_t : status Irmin.Type.t
The `V3
payload of the irmin-pack control file. `V3
is a major version. If `V4
ever exists, it will have its own dedicated payload, but the `V3
definition will still have to stick in the codebase for backward compatibilty of old pack stores.
A store may only change its major version during an open_rw
in File_manager
. Note that upgrading a major version is the only reason why open_rw
would modify files in an irmin-pack directory.
For a given major version, the format of a payload may change, but only in a backward compatible way. I.e., all versions of irmin-pack should forever be able to decode a `V3
control file, it allows for control file corruption and out-of-date code to be distinguishable.
It is legal for the payload decoder to not fully consume the input buffer. Remaining bytes means that the definition of a payload was changed.
Fields
dict_end_poff
is the offset in the dict file just after the last valid dict bytes. The next data to be pushed to the dict will be pushed at this offset.
suffix_end_poff
is similar to dict_end_poff
but for the suffix file.
status
is a variant that encode the state of the irmin-pack directory. This field MUST be the last field of the record, in order to allow extensions
val t : t Irmin.Type.t