Skip to content

Commit a562ac2

Browse files
Coffeeriphip1611
authored andcommitted
vmm: skip pending memory sends on worker failure
When a memory-sending worker fails, the migration thread calls `SendAdditionalConnections::cleanup()`. Cleanup tries to enqueue one `Disconnect` message per worker, but the bounded channel may still contain `SendMemoryThreadMessage::Memory` values. The surviving workers currently call `send_memory_ranges()` for each such value, even though the migration has already failed. Skip that call when `worker_error` is set. This consumes the queued values without processing them and lets cleanup enqueue the `Disconnect` messages. On-behalf-of: SAP leander.kohler@sap.com Signed-off-by: Leander Kohler <leander.kohler@cyberus-technology.de> Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
1 parent 1800bdd commit a562ac2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎vmm/src/migration/transport.rs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,9 @@ impl SendAdditionalConnections {
727727
})?;
728728
match message {
729729
SendMemoryThreadMessage::Memory(table) => {
730-
if external_cancel.load(Ordering::Acquire) {
730+
if external_cancel.load(Ordering::Acquire)
731+
|| worker_error.load(Ordering::Acquire)
732+
{
731733
continue;
732734
}
733735

0 commit comments

Comments
 (0)