Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Makes checks:
    1. Base snapshot (at least its metafile) exists. Exists metafile for all incremental snapshots.
    2. Validate that no misses in WAL segments since previous snapshot. SnapshotMetadata should contain info about last WAL segment that contains snapshot data:
      1. If snapshot is fullClusterSnapshotRecord must be written with rolloverType=NEXT_SEGMENT. A previous segment number is stored within existing structure SnapshotMetadata.
      2. If snapshot is incremental: stored segment number is a segment that contains ConsistentCutFinishRecord.
    3. Check that new ConsistentCutVersion is greater than version of previous snapshots.
    4. Check that baseline topology is the same (relatively to base snapshot).
    5. Check that WAL is consistent (there was no disabling WAL since previous snapshot) - this info is stored into MetaStorage.
  2. Starts a new Consistent Cut.
  3. On finish Consistent Cut:
    1. if cut is consistent: log ConsistentCutFinishRecord with rolloverType=CURRENT_SEGMENT  to enforce archiving the segment after logging the record.
    2. if cut is inconsistent: skip log ConsistentCutFinishRecord and retry since 1.
    3. fail if retry attempts are exceeded.
  4. Awaits the segment with ConsistentCutFinishRecord has been archived and compacted.
  5. Collects WAL segments since next of the last segment of previous snapshot (`prev + 1`) until segment that contains ConsistentCutFinishRecordfor current incremental snapshot.
  6. Creates hardlinks to the compressed segments into target directory.
  7. Writes a meta files with description of the new incremental snapshot:
    1. meta.smf: 
      1. ConsistentCutVersion.
      2. WAL segments participated in this snapshot.
    2. binary_meta, marshaller_data if it changed since previous snapshot.

...