Currently, I am facing two issues in the Azure function app. I have provided the details below:
1. Global variable content is being shared across executions: I have used Concurrent dictionary which is a global variable, private and static. This variable is being used in the Queue Trigger.
private static readonly ConcurrentDictionary<string, string> s_mapping = new ConcurrentDictionary<string, string>()
Intermittently, I see that the above variable is being shared across different Queue trigger executions. How can I rectify it, so that the variables are not shared across different run instances?
2. Old code running after publish through Visual studio: I publish the code using visual studio, intermittently I see that the old code is running. In the configuration, WEBSITE_RUN_FROM_PACKAGE is set as 1 and also I deploy it as a zip file from VS. I tried restarting the Function App but it doesn't seem to work.
Really appreciate the help here or any guidance on what can be done for these issues.