You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make unsuccessful write to store.
In other words call store.write.
UpdaterResult returned by post function in Updater should be something like UpdaterResult.Error.Exception(Exception(""))
Adjust Api so that post function in Updater will return UpdaterResult.Success in next calls.
Read data from store
In other words call store.stream.
Result:
No data will come to flow because deadlock happened during synchronization.
Cause of bug:
Function tryEagerlyResolveConflicts is called in RealMutableStore.
withThreadSafety is called in first line of the function. It calls storeLock.lock() for the first time.
updateWriteRequestQueue is called in the block of withThreadSafety.
Function withWriteRequestQueueLock is called in updateWriteRequestQueue.
withThreadSafety is called in withWriteRequestQueueLock.
It calls storeLock.lock() for the second time in the same thread that causes deadlock.
Example app. Store is used in com/example/dropboxstore/ui/screens/store/StoreViewModel.kt Store-deadlock.zip
The text was updated successfully, but these errors were encountered:
Reproduce:
In other words call store.write.
UpdaterResult returned by post function in Updater should be something like UpdaterResult.Error.Exception(Exception(""))
In other words call store.stream.
Result:
No data will come to flow because deadlock happened during synchronization.
Cause of bug:
Function tryEagerlyResolveConflicts is called in RealMutableStore.
withThreadSafety is called in first line of the function. It calls storeLock.lock() for the first time.
updateWriteRequestQueue is called in the block of withThreadSafety.
Function withWriteRequestQueueLock is called in updateWriteRequestQueue.
withThreadSafety is called in withWriteRequestQueueLock.
It calls storeLock.lock() for the second time in the same thread that causes deadlock.
Example app. Store is used in com/example/dropboxstore/ui/screens/store/StoreViewModel.kt
Store-deadlock.zip
The text was updated successfully, but these errors were encountered: