Brief
Optimize a versioned table without making old states still needed for the investigation inaccessible.
A maintenance job is due in the fictional story. Voss says it is harmless because current data is already in F3. Mara shows you that S100, the version where you did not authorize departure, still points to F1. Send operations a clear decision. The scene has a narrative deadline; the exercise has no timer.
Your mission
- Map the files used by S100, S101, and S102.
- Separate completed compaction from proposed expiration.
- Decide whether S100 may expire and explain the effect on time travel.
- Plan checks and records before a later cleanup.
How to check your work
- S100→F1, S101→F1+F2, S102→F3.
- Compaction and expiration treated separately.
- S100 protected; expiration blocked while needed.
- Dry run, old-version read, archive, digests, approval, and log planned.
Course example
snapshots={
"S100":{"F1"},
"S101":{"F1","F2"},
"S102":{"F3"},
}
protected={"S100","S101"}
candidate_expire={"S100"}
blocked=sorted(candidate_expire & protected)
print("compacted_current_files",sorted(snapshots["S102"]))
print("older_snapshot_files",sorted(snapshots["S100"]))
print("expire_blocked",blocked)
remaining=set(snapshots)-candidate_expire if not blocked else set(snapshots)
referenced=set().union(*(snapshots[s] for s in remaining))
print("retained_snapshots",sorted(remaining))
print("referenced_files",sorted(referenced))
print("can_read_S100","S100" in remaining)