PolymerLabs / arcs

Arcs
BSD 3-Clause "New" or "Revised" License
56 stars 35 forks source link

Change AndroidSqliteDatabaseManager to not remove instance from the cache when all clients disconnect. The fact that all clients are disconnected does not mean that there are no writes going on (eg bulk deletes). Because we are not closing the SQLite connection, we should keep the instance around so that it is reused, otherwise two instances of DatabaseImpl connected to the same db will have issues. #7032

Closed copybara-service[bot] closed 3 years ago

copybara-service[bot] commented 3 years ago

Change AndroidSqliteDatabaseManager to not remove instance from the cache when all clients disconnect. The fact that all clients are disconnected does not mean that there are no writes going on (eg bulk deletes). Because we are not closing the SQLite connection, we should keep the instance around so that it is reused, otherwise two instances of DatabaseImpl connected to the same db will have issues. this was causing the DeletePropagationTest flakiness