ShrinkGuard

data class ShrinkGuard(val maxDeleteFraction: Double = 0.5, val minRemoteEntries: Int = 4)(source)

Refuses a run that would delete more than maxDeleteFraction of the remote set once the remote holds at least minRemoteEntries non-marker files. A device that lost most of its data, or an app bug that projected an empty model, must not turn a healthy backup into a copy of the damage. The run answers UnavailableReason.ShrinkSuspected and writes nothing; the app asks the user and retries with SyncSnapshot(allowShrink = true).

Constructors

Link copied to clipboard
constructor(maxDeleteFraction: Double = 0.5, minRemoteEntries: Int = 4)

Properties

Link copied to clipboard
Link copied to clipboard