[SERVER-26887] Idempotency of createCollection with options Created: 02/Nov/16 Updated: 25/Jan/17 Resolved: 11/Nov/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 3.4.0-rc2 |
| Fix Version/s: | 3.4.0-rc4 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Siyuan Zhou | Assignee: | Siyuan Zhou |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Backport Requested: |
v3.2
|
||||||||||||||||||||||||
| Sprint: | Repl 2016-11-21 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
In oplog application, we ignore the NamespaceExists error returned by createCollection if the collection with the same name but different options already exists. Most options of createCollection don't affect the semantic of operations on secondaries, like the following (capped collection related are omitted here): However, in 3.4, we added two options that affect the behavior of operations on secondaries. collation option
Reapplication of the previous sequence of operations will overwrite the document { id: "foo" }. In the other case, if the _id index changes from case-insensitive to case-sensitive, an expected document will be considered missing. However, the missing or duplicated document in this inconsistent period is fine because the collection must be dropped later. idIndex option
The reapplication of these sequence will crash the server because of inserting decimal into 3.2 index. viewOn and pipeline The collection life cycle project will fix all these issues. Another solution is to drop the existing collection if createCollection sees an existing one with the same name. |
| Comments |
| Comment by Githook User [ 11/Nov/16 ] |
|
Author: {u'username': u'visualzhou', u'name': u'Siyuan Zhou', u'email': u'siyuan.zhou@mongodb.com'}Message: |