util_cancel_storage_migration


Description:


public void util_cancel_storage_migration (uint64 revision)

Restore the migration gate after a failed re-execution.

A revision written by a completed migration must survive a late transport error from its caller, which is what the guard below is: a revision already back means the successor migrated, and the error was reported over a request that in fact succeeded.

What the guard cannot cover is the same error reported while the successor is still starting, its revision not yet written -- the gate is then closed again under a migration that is about to run, and the successor finds nothing to do. Only the daemon knows which of the two it is, and it is not there to ask: a re-exec tears the connection down. Closing the gate is the side to be wrong on, a migration the user asks for again costing one more click where a gate left open re-runs a migration on every start. A missing reply is not one of these cases at all: reexecute.end reads it as the success it is, so an error here is a request that really did fail somewhere.

Parameters:

revision

the revision returned by util_prepare_storage_migration


Namespace: GPaste
Package: gpaste-3