0

在分片集群中添加了新的分片,新分片tag配置如下:

mongos> db.shards.find()

{ “_id” : “archive14”, “host” : “archive14/10.xx.xx.xxx:xxxxx,10.xx.xx.xxx:xxxxx,10.xx.xx.xxx:xxxxx”, “state” : 1, “tags” : [ “20210701_20211201” ] }

tag: min_20171001 { “time” : ISODate(“1970-01-01T00:00:01Z”) } –>> { “time” : ISODate(“2017-10-01T00:00:01Z”) }
tag: 20171001_20180401 { “time” : ISODate(“2017-10-01T00:00:01Z”) } –>> { “time” : ISODate(“2018-04-01T00:00:01Z”) }
tag: 20180401_20180701 { “time” : ISODate(“2018-04-01T00:00:01Z”) } –>> { “time” : ISODate(“2018-07-01T00:00:01Z”) }
tag: 20180701_20181001 { “time” : ISODate(“2018-07-01T00:00:01Z”) } –>> { “time” : ISODate(“2018-10-01T00:00:01Z”) }
tag: 20181001_20190101 { “time” : ISODate(“2018-10-01T00:00:01Z”) } –>> { “time” : ISODate(“2019-01-01T00:00:01Z”) }
tag: 20190101_20190401 { “time” : ISODate(“2019-01-01T00:00:01Z”) } –>> { “time” : ISODate(“2019-04-01T00:00:01Z”) }
tag: 20190401_20190701 { “time” : ISODate(“2019-04-01T00:00:01Z”) } –>> { “time” : ISODate(“2019-07-01T00:00:01Z”) }
tag: 20190701_20191001 { “time” : ISODate(“2019-07-01T00:00:01Z”) } –>> { “time” : ISODate(“2019-10-01T00:00:01Z”) }
tag: 20191001_20200101 { “time” : ISODate(“2019-10-01T00:00:01Z”) } –>> { “time” : ISODate(“2020-01-01T00:00:01Z”) }
tag: 20200101_20200401 { “time” : ISODate(“2020-01-01T00:00:01Z”) } –>> { “time” : ISODate(“2020-04-01T00:00:01Z”) }
tag: 20200401_20200901 { “time” : ISODate(“2020-04-01T00:00:01Z”) } –>> { “time” : ISODate(“2020-09-01T00:00:01Z”) }
tag: 20200901_20210201 { “time” : ISODate(“2020-09-01T00:00:01Z”) } –>> { “time” : ISODate(“2021-02-01T00:00:01Z”) }
tag: 20210201_20210701 { “time” : ISODate(“2021-02-01T00:00:01Z”) } –>> { “time” : ISODate(“2021-07-01T00:00:01Z”) }
tag: 20210701_20211201 { “time” : ISODate(“2021-07-01T00:00:01Z”) } –>> { “time” : ISODate(“2021-12-01T00:00:01Z”) }
tag: 20211201_20220501 { “time” : ISODate(“2021-12-01T00:00:01Z”) } –>> { “time” : ISODate(“2022-05-01T00:00:01Z”) }

新插入数据:
for (var i=1 ;i<=100 ; i++){ db.doc_history.insert({“time”:ISODate(“2021-09-01T00:00:06.426Z”})}
结果这100条数据,落不到新的分片上面去。

更改状态以发布