Closed td202 closed 2 years ago
@td202 Has this been observed on Android? I have never seen it happen.
@td202 Has this been observed on Android? I have never seen it happen.
Yes. It happened to me while testing. I will see if I can reproduce it tomorrow.
@td202 Thanks. When and if you manage, please provide details so we can verify and debug. It could very well be backend related.
I have not managed to reproduce this successfully.
Investigating the code, I wonder if there could be a race condition between IdentityUpdater.pollForIdentityStatus
and accountUpdater.updateForAllAccounts
/updateForAccount
. If these can be running concurrently (which I'm not sure of) then with unlucky timing, the call to accountRepository.update(account)
in IdentityUpdate.pollForIdentityStatus
that marks the account as finalized could be subsequently rolled-back by AccountUpdate.saveAccounts
.
I have not managed to reproduce this successfully.
Investigating the code, I wonder if there could be a race condition between
IdentityUpdater.pollForIdentityStatus
andaccountUpdater.updateForAllAccounts
/updateForAccount
. If these can be running concurrently (which I'm not sure of) then with unlucky timing, the call toaccountRepository.update(account)
inIdentityUpdate.pollForIdentityStatus
that marks the account as finalized could be subsequently rolled-back byAccountUpdate.saveAccounts
.
Well spotted! This is very possible. The solution is not easy, but I applied a candidate fix so at least the state cannot change once finalized.
I guess we just assume it's fixed so far, and then we can reopen it later if some experience it again.
Bug Description The initial account may show as pending after the identity is confirmed (and shows as such).
Steps to Reproduce
Expected Result The account should show as finalized.
Actual Result The account continues to show as pending.
Versions