package irmin-pack

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type from_v1_v2_post_upgrade = {
  1. entry_offset_at_upgrade_to_v3 : Optint.Int63.t;
}

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
type status =
  1. | From_v1_v2_post_upgrade of from_v1_v2_post_upgrade
  2. | From_v3
  3. | From_v3_used_non_minimal_indexing_strategy
  4. | T0
  5. | T1
  6. | T2
  7. | T3
  8. | T4
  9. | T5
  10. | T6
  11. | T7
  12. | T8
  13. | T9
  14. | T10
  15. | T11
  16. | T12
  17. | T13
  18. | T14
  19. | 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.

val status_t : status Irmin.Type.t
type t = {
  1. dict_offset_end : Optint.Int63.t;
  2. entry_offset_suffix_end : Optint.Int63.t;
  3. 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

val t : t Irmin.Type.t