Simplify the migration handover protocol
The three-way hand-off has a problem: there's no way to arrange for the state of the migration to be unambiguous in case of failure. If the final "disconnect" message is lost (as in, the destination never receives it whether it is sent by the sender or not), the destination has no option but to quit with an error status and let a human sort it out. However, at that point we can either arrange to have a .INCOMPLETE file still on disc or not - and it doesn't matter which we choose, we can still end up with dataloss by picking a specific calamity to have befallen the sender. Given this, it makes sense to fall back to a simpler protocol: just send all the data, then send a "disconnect" message. This has the same downside that we need a human to sort out specific failure cases, but combined with --unlink before sending "disconnect" (see next patch) it will always be possible for a human to disambiguate, whether the destination quit with an error status or not.
This commit is contained in:
@@ -99,6 +99,7 @@ void server_unlock_acl( struct server *serve );
|
||||
int server_is_mirroring( struct server * serve );
|
||||
void server_abandon_mirror( struct server * serve );
|
||||
|
||||
void server_unlink( struct server * serve );
|
||||
|
||||
int do_serve( struct server * );
|
||||
|
||||
|
Reference in New Issue
Block a user