Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mongo fragment missing fragment index

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Mongodb cluster is used to store the information about the execution and call of the interface. The cluster is divided into two shard01,shard02, and each shard has one primary node and two slave nodes.

Back up the sharded data on mongos and back up once a day. After the backup is completed, empty the data, re-establish the collection and create the sharding index. The result is as follows:

The collection on shard01 creates a sharding index, but no sharding index is created on shard02, resulting in chunk being distributed only on shard01 shards.

Specific error message:

Errmsg: "aborting migration, shard is missing 1 indexes and collection is not empty. Non-trivial index creation should be scheduled manually"

Later, chunk began to migrate after shard02 manually created the sharding index, which did not successfully create the sharding index. Technicians from mongo manufacturers also asked this question when they came to the company for training, but did not say why.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report