Persisting a slice
If the slice is being written to an existing bin:
- The slicename is hashed to determine zone number, offset and size.
- Existence of an in-memory pointer indicates the bin in question already exists on disk.
- The bin location is retrieved from the in-memory pointers.
- The entire bin is read into system memory.
- The bin is modified to include the new slice data.
- The entire new bin is appended to the end of active zone.
- The in-memory bin pointers are updated to reflect the new position of this bin.
- The Journal is updated with the new location of the bin.
- The bin reference is updated in memory to reflect that the slice data has been persisted.
- The Catalog is updated with the name of the slice data and its current revision.
If the slice is being written to a new bin:
- The slicename is hashed to determine zone number, offset and size.
- Non-existence of an in-memory pointer indicates the bin in question does not already exist on disk.
- A new bin is created in memory containing the slice.
- The new bin is appended to active zone.
- The in-memory bin pointers are updated to reflect the new position of this bin.
- The Journal is updated with the location of the new bin.
- The bin reference is updated in memory to reflect that the slice data has been persisted.
- The Catalog is updated with the name of the slice data and its current revision.