Based on the error message you received, "Unable to upload blobs to storage because of invalid blob block ids. Please ensure that blob file 'event=sporadic_contribution/date=2023-05-28/hour=00/0_62b04999def54281be2fb6de7f556b63_1.json' is not being modified by another process at the same time," it suggests that there might be multiple processes or applications attempting to modify the same blob file simultaneously.
To troubleshoot this issue, please consider the following steps:
Ensure exclusive access: Make sure that there are no other processes or applications that are concurrently writing to or modifying the same blob file. Check if any other components or services in your architecture are interacting with the same blob file.
Check Stream Analytics output settings: Review your Stream Analytics output settings to ensure that it is configured correctly and is not causing any conflicts. Verify that the output is correctly set to append data to the existing blob file.
Consider data partitioning: If you are sending messages to Event Hub rapidly and all the messages are being written to the same file in a single partition, it may result in concurrency issues. To mitigate this, you can consider implementing data partitioning in your Stream Analytics job. By partitioning the data, you can distribute the load across multiple blobs or partitions and reduce the chances of conflicts.
Check for overlapping triggers: If you have any other triggers or processes that operate on the same blob file, ensure that there are no overlapping or conflicting schedules. Verify that the processes are not attempting to modify the blob file simultaneously.
By reviewing these points and ensuring exclusive access to the blob file, you can resolve the "InvalidBlockList" error and prevent concurrency issues when writing to the blob storage from Stream Analytics.