[SERVER-26556] Indexes with collations don't work after upgrading from 3.2 Created: 10/Oct/16 Updated: 10/Oct/16 Resolved: 10/Oct/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | 3.4.0-rc0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Andrew Morgan | Assignee: | David Storch |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||
| Steps To Reproduce: |
|
||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||
| Description |
|
I'm running 3.4 rc0 without cleaning out my old data from previous release(s?). When I attempt to add an index with a collation, I get an error that collations aren't supported for v1; if I try to set it to v2 then I get an error that this isn't supported when the featureCompatibilityVersion is 3.2. If I start the mongod with an empty data directory then I can create the index. |
| Comments |
| Comment by David Storch [ 10/Oct/16 ] |
|
Hi andrew.morgan, This behavior is intentional, so I am going to close this ticket as "Works as Designed". We are currently working on documentation which should fully describe the steps required for a 3.2=>3.4 upgrade and a 3.4=>3.2 downgrade: see The short version is that clusters with existing data which are upgraded from 3.2 to 3.4 should automatically enter a mode called featureCompatibilityVersion("3.2"). When in "3.2" compatibility mode, the cluster should reject any user-initiated uses of features new in MongoDB 3.4 such as collation, decimal128 support, and read-only non-materialized views. In your repro steps, a featureCompatibilityVersion("3.2") node is correctly rejecting an attempt to build an index with a collation. During upgrade or downgrade, it is common to run a cluster in a mixed-version configuration for hours, days, or weeks. A 3.2/3.4 mixed version cluster cannot correctly support features that are new in version 3.4, which is why such clusters default to exposing a 3.2-like API. Once all nodes in the cluster have been upgraded to 3.4 binaries, the cluster can be transitioned to featureCompatibilityVersion("3.4"). This is done by running the command {setFeatureCompatibilityVersion: "3.4"} repeatedly either against a sharded cluster's mongos or a replica set's primary node until an OK response is received. (Although unless something unusual goes wrong, you should only have to run the command once.) At this point, it should be safe to use new 3.4 features. In particular, creating an index with a collation should succeed. Please watch the linked documentation tickets for upgrades on the docs pages. Let me know if you have any further questions. Best, |