fn switch_format(
sharing: &Sharing<'_>,
memory: &mut Memory,
stores: &[Store],
now_ms: i64,
problems: &mut Vec<String>,
) -> Result<bool, String>Expand description
This device takes format 2 (FORMAT), once and for all, before this
exchange goes on:
- every file format 2 divides otherwise must read whole: one that does
not (half written, broken by hand), or of no bytes while it held
entries, keeps this device on format 1 for now, said
(
share-format-wait), and the switch is tried at the next exchange; - what changed in them since the last look goes out first, in format 1
and as format 1 names it (
flush): a removal, a corrected session reach the devices that still read format 1; - each element of a list format 2 names by ids is given its id in the
file, once, through the file’s lock, the file as it was kept first
among the earlier versions (
give_ids); from then on every element carries an id of its own, which changing it never changes; - the memory is said in format 2’s names, each renamed entry’s last
clock kept as its floor (
Floor).
Returns whether it did. Stopped half way, the next exchange does it again from where the files and the memory are: the ids already written stay, what was sent is known.