Mongodb 分片 update 条件没有分片键 导致保存失败

浏览:1620次阅读
没有评论

提醒:本文最后更新于 2021-09-26 18:25,文中所关联的信息可能已发生改变,请知悉!

An upsert on a sharded collection must contain the shard key and have the simple collation. Update request:

update 时 condition 参数没有带分片键值 导致以上错误

解决方法:update 时提交键值到查询条件中

正文完
 0
包子
版权声明:本站原创文章,由 包子 2019-12-03发表,共计143字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(没有评论)