Skip to main content

Module batch

Module batch 

Source
Expand description

Accumulation of admitted entries into the batch that becomes the next object, and the entry id scheme.

Structsยง

OpenBatch ๐Ÿ”’
Entries admitted since the last seal, together with the position of the last entry admitted per region.

Constantsยง

OBJECT_SEQ_LIMIT ๐Ÿ”’
Object sequences are 0..OBJECT_SEQ_LIMIT, the 44 bits an entry id leaves above the position.
POSITION_BITS ๐Ÿ”’
Bits of an entry id that hold the position of the entry among the entries of its region inside the object; the remaining high bits hold the object sequence.
POSITION_LIMIT ๐Ÿ”’
Positions are 1..POSITION_LIMIT, so an object holds at most 2^20 - 1 entries of one region and a batch seals before a region reaches the limit. This is a theoretical bound: an object is sealed by size long before.

Functionsยง

entry_id
Returns the id of the entry at position among the entries of its region in the object object_seq.
sequence_floor ๐Ÿ”’
Returns the smallest object sequence whose entry ids are all greater than entry_id. Zero names no entry, so it needs no floor.