【问题标题】:Unable to Write in Azure CosmosDB (MongoDB)无法在 Azure CosmosDB (MongoDB) 中写入
【发布时间】:2021-04-30 15:58:29
【问题描述】:

我在 azure 中创建了一个资源作为 CosmosDB 的 MongoDB api。但是当我添加任何集合时。我收到以下错误。

OperationFailure: Retryable writes are not supported. Please disable retryable writes by specifying "retrywrites=false" in the connection string or an equivalent driver specific config., full error: {'ok': 0.0, 'errmsg': 'Retryable writes are not supported. Please disable retryable writes by specifying "retrywrites=false" in the connection string or an equivalent driver specific config.', 'code': 2, 'codeName': 'BadValue'}

【问题讨论】:

  • 请编辑您的问题以显示您正在使用的导致错误的代码(还请指定您使用的语言,这将帮助人们了解您使用的 SDK) .仅凭一条没有任何其他详细信息的错误消息很难诊断。

标签: azure azure-cosmosdb azure-cosmosdb-mongoapi


【解决方案1】:

正如消息所示,我们还不支持可重试的重写。如果您在门户中为您的帐户使用连接字符串,则它具有该选项并将更正此错误。

更新:Cosmos 现在支持服务器端重试,因此这不再是问题。

【讨论】:

  • 我正在使用从资源描述中复制的连接字符串,并且我尝试使用 retrywrites=false。但是遇到同样的错误。
  • 请分享驱动程序/框架(java/.net 等)以及您正在使用的驱动程序版本。
  • 我正在使用 python 3.6 和 MongoDB 3.6 api。
猜你喜欢
  • 2013-06-06
  • 2018-09-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-05-07
  • 2018-11-07
  • 2019-09-20
  • 1970-01-01
相关资源
最近更新 更多