Load rollback data in RollbackManagerServiceImpl constructor.
Load the rollback data from persistent storage in the RollbackManagerServiceImpl constructor instead of lazily. This way we don't have to remember to ensureRollbackDataLoaded every time we access the rollback data. In the vast majority of cases we expect there to be no data to load, so this shouldn't impact boot time. Change reloadPeristentData to block until the data has been reloaded. Consistently throw IllegalStateException in case of InterruptedException. There shouldn't be anyone calling Thread.interrupt() on the RollbackManagerHandlerThread. If it turns out someone does call Thread.interrupt() on the RollbackManagerHandlerThread, throwing IllegalStateException instead of ignoring the exception will help debug; then we can update the logic for handling InterruptedException in whatever way makes most sense. Test: atest RollbackTest Bug: 136241838 Change-Id: I9dc51268db39b9ba29aedbcbd09ab9111b294a7b Merged-In: Ia5e73b0786b93064f8f80138d3e162b9613f2d55
Loading
Please register or sign in to comment