summaryrefslogtreecommitdiff
path: root/tools/bit/command.cpp
diff options
context:
space:
mode:
author Paul Hadfield <hadfieldp@google.com> 2022-01-28 14:14:40 +0000
committer Paul Hadfield <hadfieldp@google.com> 2022-02-21 16:28:51 +0000
commitae68a7c59d041be6deae12ec0908853450d388c7 (patch)
treeaf0a0b81cfe16da196384ea0ce97eccbf23cfe1b /tools/bit/command.cpp
parent329d5a13a53ac63a0e8a68d3ebf61536f89bfa1a (diff)
Cancel active Futures/Callbacks if transport dies.
Callers would remain blocked until AndroidFuture or TransportClient- Callback times out (upto 10mins) in the situation where the Transport dies during an operation. This change adds queues for the futures and callbacks that are active. If they complete normally, they are dequeued. If the TransportConnection forwards a notification that the transport dies, then all queued active futures and callbacks are cancelled. Add a unit test for BackupTransportClient to test the cancellation logic for futures and callbacks. This is multithreaded so was tested with 500 iterations to weed out the possibility of race conditions. BUG: 202716271 Change-Id: I6924c89753f85b9d78a1c6e61518dc1c1e617ef3 Test: atest --iterations 500 BackupTransportClientTest atest --iterations 500 TransportStatusCallbackTest atest CtsBackupTestCases CtsBackupHostTestCases (Gts tests still in progress) (cherry picked from commit 694631ce7f85efb1ea16b4c1f17d0e69cb1bcc68)
Diffstat (limited to 'tools/bit/command.cpp')
0 files changed, 0 insertions, 0 deletions