[SERVER-7469] Undocumented asynchronous index propagation over shards Created: 25/Oct/12  Updated: 26/Oct/12  Resolved: 25/Oct/12

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: 2.0.6
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Grégoire Seux Assignee: Unassigned
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

When you create an index on one shard (connecting directly to its primary), other shards will eventually create the same index.

It seems that it takes between 10 to 24 hours to propagate.
I have reproduced this behavior on two distinct clusters.

Is this an expected behavior ?



 Comments   
Comment by Grégoire Seux [ 26/Oct/12 ]

Ok chunk movement indeed can explain this.

Comment by Greg Studer [ 25/Oct/12 ]

Index creation happens as a first chunk moves to a new shard for a sharded collection - are you seeing this happen for unsharded collections (where all the data should exist on a single shard)? The collection should be empty on the first chunk move, so there's not much impact.

If you are directly connecting to a shard and creating an index for a sharded collection, this is unsupported as many operations may assume a sharded collection has the same indexes everywhere. As chunks move, you'd then get index creation sporadically (potentially on large datasets). The intended use case is to create the index via mongos.

Comment by Grégoire Seux [ 25/Oct/12 ]

My point is that this behavior is a bug because :

  • it is not documented
  • this index creation should occur only when adding a new shard
Comment by Ian Whalen (Inactive) [ 25/Oct/12 ]

Hi Gregoire, this project is intended for feature requests, improvements, and bug fixes. For questions like this please create a new discussion in our forum at https://groups.google.com/forum/?fromgroups#!forum/mongodb-user - if the discussion there leads to the conclusion that this should be a feature request or bug ticket, then you should follow up with a ticket containing the appropriate details here.

Generated at Thu Feb 08 03:14:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.