结构:一个mogos 一个config :(shard1,shard2,shard3)都是主库,均分存储。
查询数据库状态都正常,我分析是因为主键存储了汉字?大神给看看!多谢!
— Sharding Status —
sharding version: {
“_id” : 1,
“minCompatibleVersion” : 5,
“currentVersion” : 6,
“clusterId” : ObjectId(“5fa1019a5b14a7a4938ab64a”)
}
shards:
{ “_id” : “shard1”, “host” : “shard1/10.1.8.217:27011”, “state” : 1 }
{ “_id” : “shard2”, “host” : “shard2/10.1.8.218:27012”, “state” : 1 }
{ “_id” : “shard3”, “host” : “shard3/10.1.8.219:27013”, “state” : 1 }
active mongoses:
{ “_id” : “khs_mongo8216:27000”, “advisoryHostFQDNs” : [ ], “mongoVersion” : “4.4.1”, “ping” : ISODate(“2022-05-06T10:21:57.095Z”), “up” : NumberLong(5517985), “waiting” : true }
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:
437 : Success
databases:
{ “_id” : “trace_db”, “primary” : “shard3”, “partitioned” : true, “version” : { “uuid” : BinData(4,”zjCmt/+dQF6lww3AVdcPpw==”), “lastMod” : 1 } }
trace_db.trace_quality
shard key: { “trace_code” : 1 }
unique: false
balancing: true
chunks:
shard3 1
{ “trace_code” : { “$minKey” : 1 } } –>> { “trace_code” : { “$maxKey” : 1 } } on : shard3 Timestamp(1, 0)
trace_db.trace_video
shard key: { “trace_code” : 1 }
unique: false
balancing: true
chunks:
shard1 47046
shard2 47046
shard3 47045
{ “trace_code” : { “$minKey” : 1 } } –>> { “trace_code” : “20201001836239” } on : shard2 Timestamp(67119, 0)
{ “trace_code” : “20201001836239” } –>> { “trace_code” : “20201006416045” } on : shard2 Timestamp(72236, 0)
{ “trace_code” : “20201008040796” } –>> { “trace_code” : “20201008054986” } on : shard3 Timestamp(66704, 0)
{ “trace_code” : “20201008054986” } –>> { “trace_code” : “20201008423960” } on : shard3 Timestamp(66989, 0)
。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。上面都是正常数据 shard1、shard2、shrad3均分。但是后面很多数据就都是shard1了
{ “trace_code” : “20220506988757” } –>> { “trace_code” : “20220506991005” } on : shard1 Timestamp(85786, 3)
{ “trace_code” : “20220506991005” } –>> { “trace_code” : “20220506993038” } on : shard1 Timestamp(85632, 5)
{ “trace_code” : “20220506993038” } –>> { “trace_code” : “20220506996591” } on : shard1 Timestamp(85724, 2)
{ “trace_code” : “20220506996591” } –>> { “trace_code” : “20220506998581” } on : shard1 Timestamp(85724, 3)
{ “trace_code” : “20220506998581” } –>> { “trace_code” : “20220506999206” } on : shard1 Timestamp(85702, 3)
{ “trace_code” : “20220506999206” } –>> { “trace_code” : “20220612858876” } on : shard1 Timestamp(85828, 4)
{ “trace_code” : “20220612858876” } –>> { “trace_code” : “TSMOBILE_CHANNEL_01” } on : shard1 Timestamp(85828, 5)
{ “trace_code” : “TSMOBILE_CHANNEL_01” } –>> { “trace_code” : “TSMOBILE_CHANNEL_02” } on : shard1 Timestamp(67055, 5)
{ “trace_code” : “TSMOBILE_CHANNEL_02” } –>> { “trace_code” : “TSMOBILE_CHANNEL_14” } on : shard1 Timestamp(66967, 7)
{ “trace_code” : “TSMOBILE_CHANNEL_14” } –>> { “trace_code” : “TSMOBILE_SALE_013” } on : shard1 Timestamp(66964, 3)
{ “trace_code” : “TSMOBILE_SALE_013” } –>> { “trace_code” : “r” } on : shard1 Timestamp(66963, 3)
{ “trace_code” : “TSMOBILE_SALE_037” } –>> { “trace_code” : “TSMOBILE_SALE_071” } on : shard1 Timestamp(67006, 2)
{ “trace_code” : “TSMOBILE_SALE_071” } –>> { “trace_code” : “TSMOBILE_SALE_094” } on : shard1 Timestamp(67006, 3)
{ “trace_code” : “TSMOBILE_SALE_094” } –>> { “trace_code” : “TSMOBILE_SALE_112” } on : shard1 Timestamp(66963, 4)
{ “trace_code” : “TSMOBILE_SALE_112” } –>> { “trace_code” : “TSMOBILE_SALE_119” } on : shard1 Timestamp(66963, 5)
{ “trace_code” : “TSMOBILE_SALE_119” } –>> { “trace_code” : “TSMOBILE_SALE_137” } on : shard1 Timestamp(66959, 4)
{ “trace_code” : “TSMOBILE_SALE_137” } –>> { “trace_code” : “car_insurance_jq” } on : shard3 Timestamp(67983, 2)
{ “trace_code” : “car_insurance_jq” } –>> { “trace_code” : “任e飞” } on : shard3 Timestamp(67983, 3)
{ “trace_code” : “任e飞” } –>> { “trace_code” : “司乘无忧货车版” } on : shard3 Timestamp(67743, 5)
{ “trace_code” : “司乘无忧货车版” } –>> { “trace_code” : “泰山护身福-司乘无忧” } on : shard3 Timestamp(72839, 6)
{ “trace_code” : “泰山护身福-司乘无忧” } –>> { “trace_code” : “泰山护身福-孝心保” } on : shard3 Timestamp(72839, 7)
{ “trace_code” : “泰山护身福-孝心保” } –>> { “trace_code” : “泰山护身福-守护佳人” } on : shard3 Timestamp(72235, 3)
{ “trace_code” : “泰山护身福-守护佳人” } –>> { “trace_code” : “泰山护身福-海归版” } on : shard3 Timestamp(67743, 3)
{ “trace_code” : “泰山护身福-海归版” } –>> { “trace_code” : “白衣天使守护计划” } on : shard3 Timestamp(66962, 5)
{ “trace_code” : “白衣天使守护计划” } –>> { “trace_code” : “齐鲁爱心保-多系人-地区” } on : shard2 Timestamp(72968, 16)
{ “trace_code” : “齐鲁爱心保-多系人-地区” } –>> { “trace_code” : “齐鲁爱心保-本人+多系人-地区” } on : shard2 Timestamp(72968, 17)
{ “trace_code” : “齐鲁爱心保-本人+多系人-地区” } –>> { “trace_code” : { “$maxKey” : 1 } } on : shard2 Timestamp(72968, 18)