英文:
Azure Function CosmosDB Trigger does not pick-up the changes in one partition
问题
我遇到了Azure Function v4与cosmos DB触发器的问题。函数无法捕捉特定分区值的更改,但在其他分区值上仍正常运行。在函数日志中找不到函数运行更改的迹象。
只有在重新启动函数后才解决了这个问题,然后才能捕捉到该分区的更改。有人知道这个问题的根本原因吗?我尝试搜索Microsoft文档,但迄今为止还没有找到任何信息。
英文:
I'm facing a problem with the Azure Function v4 with the cosmos DB trigger. The function doesn't pick up the changes on a specific Partition value, however still running properly in other partition value. There is no sign of function running that change in the function log.
It's only resolved after I restart the function, then the changes on that partition have been pick up. Does anyone know the root cause of this? I'm trying to search through Microsoft document but have not found anything so far.
答案1
得分: 2
参考链接:https://learn.microsoft.com/azure/cosmos-db/nosql/troubleshoot-changefeed-functions#some-changes-are-missing-in-your-trigger
首先启用 日志,Debug
级别的日志包括哪个函数应用实例正在获取哪个租约。通常,这可能是另一个函数应用“窃取”租约(您部署了两个或更多函数应用,使用相同的租约配置运行),或者存在运行时问题,该分区/租约被获取、处理失败,然后被释放。
可以在日志中看到这一点,启用 Warning
级别即可。
英文:
Start by enabling logs, Debug
level logs include which Function App instance is acquiring which lease. Most commonly this is either due to another Function App "stealing" leases (you have 2 or more Function Apps deployed or running with the same Lease configuration) or there is a runtime problem and that partition/lease being acquired, failed processing, and being released.
That can be seen on the logs, with Warning
level enabled.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论