When creating a function in Azure Functions, I needed to call the PlayFab API several times and make changes to the user data.
If the PlayFab API call fails in the middle of the process, how can I roll back, what are the best practices?
When creating a function in Azure Functions, I needed to call the PlayFab API several times and make changes to the user data.
If the PlayFab API call fails in the middle of the process, how can I roll back, what are the best practices?
Do you mean you update multiple user data K/V pairs in one Azure Function, and you want to undo all updates when one of the K/V pairs is not updated successfully? If so, for clarification, we don’t support one-click rollback of the user data. To make your data can be restored, you can create the temporary items to store the latest version’s data instead of replacing the old data with new data directly. In this way, you can verify the integrity of temporary data first, then determine whether you will update the persistent data with them or not to prevent the data from being updated incompletely.
2 People are following this question.