Description
Library name and version
Azure.Storage.Blobs 12.15.1
Describe the bug
I have a blob trigger set up to montitor one of my containers in Azure Storage. The associated scan over the blobs is firing non-stop, looping over the same blobs again and again, causing excessive operations on the storage account.
Expected behavior
Would expect blobs already processed to be skipped.
Actual behavior
A scan is firing immediately after the last one has finished. I'm not sure if that's expected behaviour, but what is not expected, is that the same blobs are being detected by the scan over and over again.
I have noticed that at the start of each scan, this log message is printed to the function logs:
[Verbose] Poll for blobs newer than '0001-01-01T00:00:00.000' in container '<container>' with ClientRequestId 'xxx' found 1839 blobs in 302 ms. ContinuationToken: False
Comparing with other blob triggers, I have discovered that the relevant scaninfo file seems to not have been created/updated. If I manually create the scaninfo file with a date/time, then the next scan will poll for blobs newer than that time, but the scaninfo file is then not updated again automatically.
Blob receipts are being created, and each blob is processed with a message similar to the following:
[Verbose] Blob '<blob name>' will be skipped for function 'FillBlobMetaData' because this blob with ETag '"0x8D8798F7B192688"' has already been processed. PollId: '566d148e-11d0-4a80-86a0-c7d4cfab3b58'. Source: 'ContainerScan'.
Reproduction Steps
Enable my function within the function app on the Azure Portal.
Environment
.NET 6.0 app
Azure Functions, runtime version 4.16.5.20396
Microsoft.Azure.WebJobs.Extensions.Storage.Blobs v5.1.1