Azure cosmosdb 带有Cosmos DB的Hangfire:响应状态代码不表示成功:未找到(404);子状态:0;活动ID

Azure cosmosdb 带有Cosmos DB的Hangfire:响应状态代码不表示成功:未找到(404);子状态:0;活动ID,azure-cosmosdb,hangfire,Azure Cosmosdb,Hangfire,我有一个Hangfire,它使用Cosmos DB作为数据库。当我选择“重试”选项卡时,出现错误: An unhandled exception occurred while processing the request. AggregateException: One or more errors occurred. (Response status code does not indicate success: NotFound (404); Substatus: 0; ActivityId

我有一个Hangfire,它使用Cosmos DB作为数据库。当我选择“重试”选项卡时,出现错误:

An unhandled exception occurred while processing the request.
AggregateException: One or more errors occurred. (Response status code does not indicate success: NotFound (404); Substatus: 0; ActivityId: 68d632fc-8c5a-4624-80a5-7e9bc0d252f0; Reason: ({
"Errors": [
"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found"
]
});)
System.Threading.Tasks.Task.Wait(int millisecondsTimeout, CancellationToken cancellationToken)

CosmosException: Response status code does not indicate success: NotFound (404); Substatus: 0; ActivityId: 68d632fc-8c5a-4624-80a5-7e9bc0d252f0; Reason: ({
"Errors": [
"Resource Not Found. Learn more: https://aka.ms/cosmosdb-tsg-not-found"
]
});
Microsoft.Azure.Cosmos.ResponseMessage.EnsureSuccessStatusCode()
当我试图在Cosmos DB上使用select语句获取带有
key='retries'
的项时:

SELECT * FROM c where c.key = 'retries' and c.value = 'b7ad3971-8647-4a29-a2a7-412e2da41527'
我在Cosmos DB中发现错误:

Failed to query item for container hangfire:
 Gateway Failed to Retrieve Query Plan: Message: {"errors":[{"severity":"Error","location":{"start":46,"end":51},"code":"SC1001","message":"Syntax error, incorrect syntax near 'value'."}]}

ActivityId: 4bc1d85a-4ea6-47c2-95d0-81bdde78f389, Microsoft.Azure.Documents.Common/2.11.0, Microsoft.Azure.Documents.Common/2.11.0
当我这样选择时:

SELECT * FROM c where c.key = 'retries'
我可以毫无差错地看到结果。将
和c.value=…
添加到where子句时出错。 我无法打开Hangfire仪表板上的重试选项卡。 Cosmos中的Json看起来像:

{
        "key": "retries",
        "value": "b7ad3971-8647-4a29-a2a7-412e2da41527",
        "score": 0,
        "created_on": 1611580578,
        "type": 7,
        "id": "b04c5c23-d324-45e1-acce-cdd2379c4073",
        "_rid": "QO5WANzKkljY-gEAAAAAAA==",
        "_self": "dbs/QO5WAA==/colls/QO5WANzKklg=/docs/QO5WANzKkljY-gEAAAAAAA==/",
        "_etag": "\"2d01ed73-0000-0100-0000-600ec4a30000\"",
        "_attachments": "attachments/",
        "_ts": 1611580579
    },

出现此错误的原因是
value
是一个关键字。请尝试以下查询,它应该可以工作:

SELECT * FROM c where c.key = 'retries' and c["value"] = 'b7ad3971-8647-4a29-a2a7-412e2da41527'