#Possible delay between revoking a mandate and getting the updated status from the API?

1 messages · Page 1 of 1 (latest)

normal badge
#

We are offering our admins the ability to revoke mandates from the internal admin panel.

Whenever they click revoke, 2 things happen:

  1. An API call is made to revoke the mandate.
  2. All mandates of the user are retrieved using the List Mandates and then we sync them one by one with our database.

However, I am getting reports sometimes that when a mandate is revoked, that the revoked status does not show up in our database.

Therefore I suspect that there is a very slight delay between the action of revoking a mandate and the updated status being returned from a fresh GET api call.

Is that possible that there is a certain lag? For example, because of database read/write connections and replication?

Thanks!

molten pawn
#

Hi @normal badge! I can't confirm if there is a delay between the action of revoking a mandate and the updated status being returned from a fresh GET API call, but I am checking with the team and hopefully will hear soon!

#

Will keep you posted 🙌🏼

normal badge
#

Thanks @molten pawn!

molten pawn
#

Hi @normal badge 👋

It appears to be a probable scenario: the replication delay in most cases is under 1 second, but it can grow between 1 and 5 seconds depending on the load on database. Normally, API clients wouldn't notice much of this delay, except in the case when they perform a write action and immediately retrieve the "updated" status. Depending on which replica they end up on and the replication lag of that specific node, they might encounter this issue.

But again, usually it's under 1 second.

If it's instant (if you try it right after revoking, in the same action), even a 700ms delay can still be a problem for you. As a suggestion, if you would like to validate it, you could add a 1-second wait after sending the write action to see if the problem goes away.

Not sure if it's feasible for your use case, but hope this helps!

normal badge