Persisting a slice

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