[SERVER-22902] autoIndexId cannot be false when createCollection Created: 01/Mar/16 Updated: 15/Nov/21 Resolved: 03/Mar/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | 3.0.9, 3.2.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Zhang Youdong | Assignee: | Ramon Fernandez Marina |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | In a replicaset, create a collection
then insert documents to collection
monitor the cpu usage on secondary node |
||||||||
| Participants: | |||||||||
| Description |
|
In my environment(Replica set), when I create collection with { autoIndexId : false}. After insert happened in primary, the secondary bares very high load to replay the oplog, becaure secondary need to do an upsert based on _id field which need a full COLLSCAN without id index. In MongoDB's docuentment(https://docs.mongodb.org/manual/reference/command/create/#dbcmd.create), a tips said: IMPORTANT but MongoDB did allow autoIndexId option set to false in Replica Set, it's unreasonable, so I suggest the fix this issue, forbid autoIndexId set to false when createCollection in all cases. (because single instance may change to replica set in the future) |
| Comments |
| Comment by Ramon Fernandez Marina [ 03/Mar/16 ] |
|
Thanks for the pull request zyd_com. There's already a ticket to remove autoIndexId:false altogether, not only on replica sets: Cheers, |
| Comment by Zhang Youdong [ 01/Mar/16 ] |