I have the following situation. I had a function that ran on Windows App Service Plan. That function processed blobs. The function had default LogsAndContainerScan trigger. Now after some time I decided to rewrite this function and also migrate it from Windows to Linux, I also wanted to deploy it in an isolated environment inside a docker container. To accomplish this I createad another Function App that was running on a new App Service Plan for Linux. During the deployment I deployed and started a new function app on Linux, and stopped the old one for Windows.
To my big surprise, the new function started to process the blobs that were processed long ago by the previous function. After some digging and reading answers on Stack Overflow for example this one or this one, it seems to me that the function will process a blob only if it does not have a blob receipt inside azure-webjobs-hosts blob container. When I looked at my azure-webjobs-hosts blob container I found out that there are actually two folders in there - one for my previous function, and one for my new function. So I conclude that even though there were receipts for the existing blobs, they were in the folder of the old function app, which means that when I created a new function app, it tried to find the receipts in another folder, couldn't find them, so it started to process all of the blobs again. Which basically means that whenever I decide to create another function app with a blob trigger, it will try to reprocess all of the existing files.
The question that I have.
- Is my reasoning above correct, and every function app reprocess the blobs again that were processed before? If no why did it happen in my situation?
- Is there any way I can avoid this situation in the future, when I, for example, decide to create yet another function app that will operate on the same blob container?