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