'Do Azure Functions execute multiple instances of a function?
I am experiencing some very strange Azure function behavior.
I have a function that queries Azure Active Directory, gets each page of 200 users, passes it to a method that saves the page to a database.
I have stepped through the code, its executing linearly, there is no race condition or looping I can see, yet the data is being saved twice!
Also, with regard to Visual Studio, when stepping through the code using breakpoints, the breakpoint is jumping all over the place each time I press F10.
Is there any behavior in Azure Functions that would cause this?
Solution 1:[1]
- Without looking into the code, it's hard to get the resolutions. But as per the below statement.
I have stepped through the code, its executing linearly, there is no race condition or looping I can see, yet the data is being saved twice!
Whenever the function gets called it will replay every time with different input arguments.
You can have a look on Azure Durable functions Microsoft Document for better understanding
Also, you can have a look on this SO with related discussions.
Solution 2:[2]
After some troubleshooting, it seems the duplicates are only comming from the delta query, but not if simply get all users.
In the interests of time we are avoiding deltaquery for the moment and will come back to it at another time.
Thanks for the replies on this.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | SaiSakethGuduru-MT |
Solution 2 | wilson_smyth |