Don't cancel the entire backup if agent disconnects and log if the agent pipe is broken
Normally the bug fix and the extra logging should be in separate CLs. However as explained in the linked bug, there is a race condition between the method throwing the IOException returning and us getting a cancellation callback from ActivityManager. If we get the callback first, the session fails. The extra IPC from the logging in handling the exception means the callback gets a few additional milliseconds to win the race. So with the logging, the race condition is much more likely to happen and the logging should not be checked in without the bug fix. And if one gets rolled back, the other should as well. This is why I made them a single CL. Flag: EXEMPT bugfix Bug: 400669414 Test: manual // PFTBT is notoriously impossible to write unit tests for. Change-Id: Icbcb72a876f927a94675c9837b0206f1a631dff5
Loading
Please register or sign in to comment