package irmin-pack
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=535254ca443858bfc9e540535977fed63e9206d4b78c5cac0239d1e6657b5c78
sha512=fa18557fcf808121a0495de707c6f7bff4a69197b310480816648adafd4a659b5673a1f5bbf4574f517b7d93253735ef7798b0c365d87afac60675007ef19b54
doc/irmin-pack.unix/Irmin_pack_unix/Control_file/Payload_v3/index.html
Module Control_file.Payload_v3
Source
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.
type status =
| From_v1_v2_post_upgrade of from_v1_v2_post_upgrade
| From_v3
| From_v3_used_non_minimal_indexing_strategy
| T0
| 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
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.
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.
type t = {
dict_offset_end : Optint.Int63.t;
entry_offset_suffix_end : Optint.Int63.t;
status : status;
}
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 irmin-pack directories.
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_offset_end
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.
entry_offset_suffix_end
is similar to dict_offset_end
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