0
我创建了一个碎片,状态似乎不错MongoDB的碎片文件插入
--- Sharding Status ---
sharding version: {
"_id" : 1,
"minCompatibleVersion" : 5,
"currentVersion" : 6,
"clusterId" : ObjectId("58aefb3181741b40c635c327")
}
shards:
{ "_id" : "repl1", "host" : "repl1/prod-mongo-repl1:27017,prod-mongo-repl1:27018,prod-mongo-repl1:27019", "state" : 1 }
{ "_id" : "repl2", "host" : "repl2/prod-mongo-repl2:27017,prod-mongo-repl2:27018,prod-mongo-repl2:27019", "state" : 1 }
active mongoses:
"3.4.2" : 1
autosplit:
Currently enabled: yes
balancer:
Currently enabled: yes
Currently running: no
Failed balancer rounds in last 5 attempts: 0
Migration Results for the last 24 hours:
No recent migrations
databases:
{ "_id" : "mydatabase", "primary" : "repl1", "partitioned" : true }
mydatabase.extract_purchases
shard key: { "month" : 1, "year" : 1 }
unique: false
balancing: true
chunks:
repl1 1
{ "month" : { "$minKey" : 1 }, "year" : { "$minKey" : 1 } } -->> { "month" : { "$maxKey" : 1 }, "year" : { "$maxKey" : 1 } } on : repl1 Timestamp(1, 0)
但现在,尝试插入或事件只是运行一个find命令不能工作,我有这样的消息
尝试:
db.extract_purchases.insert({year:2017, month:1})
结果是
WriteResult({
"nInserted" : 0,
"writeError" : {
"code" : 82,
"errmsg" : "no progress was made executing batch write op in mydatabase.extract_purchases after 5 rounds (0 ops completed in 6 rounds total)"
}
})
几秒/分钟后
我不知道该怎么办...我在一个“mongos”外壳
非常感谢您的帮助!
嗨!感谢您的帮助:我可以写在unsharded集合。问题出现在为集合激活分片之后。我在每个配置上都有一个Primary,repl1 && repl2 ... – benjamin
嗨,我今天重新配置了一个完整的碎片infra,问题是一样的......(Je peux te contacter?entre lillois?) – benjamin
是的,米试图达到你,但它似乎并没有工作;) –