Skip to content

Storage Synchronization

Jan Tomášek edited this page Apr 4, 2019 · 1 revision

When attaching a new logical storage S2 to the system, synchronization follows these steps:

  1. System checks for preconditions like that it is in read-write mode, S2 is reachable etc. S2 is set to read-write mode and attached to the list of storages.
  2. Phase INIT begins.
  • System is is set to read-only mode.
  • System waits for all running transactions and package processing to finish.
  • System create dataspaces at S2.
  • Timestamp T1 is marked.
  • System is set to read-write mode.
  1. Phase COPYING_ARCHIVED_OBJECTS begins.
  • All objects created before T1 are being copied to S2 with their actual states.
  • Through the whole process S2 accepts all new requests to save new objects. It is possible that object O1 (AIP) and O2 (AIP XMLv1) were archived before T1 but were not yet copied to S2, yet S2 accepts object O3 (AIP XMLv2) which is a new version of O1. Collision will not occur in this case, because logical storages do not operate with previous versions of objects anyhow: the versioning logic is handled in upper layer.
  • Through the whole process S2 do not accept any retrieval requests, because it is set to write-only mode.
  • Through the whole process S2 do not accept any remove/renew/delete requests. These requests could cause a collision if O1 was archived before T1 but not yet copied to S2: then it can be marked as removed at S2.
  1. After the COPYING_ARCHIVED_OBJECTS all objects are present at S2 (those archived before T1 were copied, those archived after T1 were stored directly).
  2. Phase PROPAGATING_OPERATIONS begins.
  • All remove/renew/delete operations audited after T1 are propagated to the new storage.
  • System is set to read-only mode at the end.
  1. Phase SYNC_CHECK begins.
  • System verifies that storage contains state metadata (e.g. .ARCHIVED file) of every object stored in database.
  • Checksums are checked during copy process and so are not checked during this phase anymore.
  • System and logical storage are set to read-write mode at the end.
  1. DONE

Clone this wiki locally