The apply of a plan: the only place a bridge changes anything. It refuses a plan that is not the one a person approved or that the stores no longer make; it runs the actions with a bounded number at once; it writes only what the plan says, each write expecting what the plan saw (so that a change made since is a conflict and not an overwrite); it uses the batch of the destination where it has one and the caller asks for it; it checks what it wrote; and it tells what it did as events and ends with a report of every action. Nothing is thrown: a store that fails makes a failed outcome.
How what was written is checked: auto by the revision where it is the hash of the bytes and by reading it back where it is not, read-back always by reading, none not at all.
type ApplyOptions = {
/** At most this many actions at once. Default 4. */
readonly concurrency?: number;
readonly…(800 characters)
typeApplyOptions= {
/** At most this many actions at once. Default 4. */readonlyconcurrency?:number;
readonlyverify?:VerifyMode;
/** Make the writes, updates and deletes as one batch where the destination has one. Default false. */readonlyatomic?:boolean;
/** Make the plan again first and refuse if it is not the same plan. Default true. */readonlyrecheck?:boolean;
/** Go on with a plan that was applied in part: do not make the plan again, and skip what the journal says is done. */readonlyresume?:boolean;
readonlyjournal?:Journal;
/** The hash of the plan a person approved. */readonlyapproved?:PlanHash;
/** Leave the conflicts of the plan and do the rest. Default false: a plan with conflicts is refused. */readonlyskipConflicts?:boolean;
};
typeReport= {
readonlyhash:PlanHash;
readonlyoutcomes:readonlyOutcome[];
readonlydone:number;
readonlyfailed:number;
readonlyskipped:number;
readonlybytes:number;
/** The writes that expected no revision, because the destination cannot. */readonlyunguarded:number;
};