-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: 8.2.0
-
Component/s: None
-
Query Integration
-
Minor Change
-
200
-
None
-
None
-
None
-
None
-
None
-
None
-
None
ISSUE DESCRIPTION
This issue will cause 2dsphere indexes created after SERVER-84794 but before SERVER-116179 (this patch) to cause validation failures and warnings. In certain queries and document structures where a legacy point appears before a geoJSON point in field order AND the point values differ, it may also result in incorrect query results, due to changes in how indexes get parsed.
In SERVER-84794, 2dsphere index parsing was changed to always prefer parsing GeoJSON points, regardless if a legacy point exists in the document or not. This means that documents that have both formats present, but in different values, will generate new 2dsphere index keys and lead to $match queries not matching the correct set of documents. See the description in SERVER-84794 for a more thorough explanation. However, this change was not gated by a bump to 2dsphere index version (which was on v3).
SERVER-116179 adds the old indexing behavior back and reintroduces the SERVER-84794 logic as a v4 index.
DIAGNOSIS AND IMPACT
The validation errors caused by SERVER-116179 will manifest similarly to AF-15974, with errors reported similar to:
- index/error geometry.features.geometry_2dsphere: Index 'geometry.features.geometry_2dsphere' was created with 2dsphereIndexVersion 3, but validation indicates it should be rebuilt with version 4. Please drop and recreate this index with version 4.
In addition, queries on 2dsphere indexes created between the patch for SERVER-84794 and SERVER-116179 (which should only affect users using v8.2) may result in the wrong sets of documents being returned for match queries.
REMEDIATION AND WORKAROUNDS
The remediation for this issue is to recreate the 2dsphere index. Users should default to using the v4 behavior, as it is the most up-to-date, however, users can specify a `2dsphereIndexVersion: 3` and recreate a v3 index correctly as well.{}
- causes
-
SERVER-119192 Pin 2dsphereIndexVersion to v3 in FCV upgrade downgrade tests
-
- Closed
-
-
SERVER-119796 Pin more FCV upgrade/downgrade 2dsphere index versions to v3
-
- Closed
-
-
SERVER-120418 Pin 2dsphere index version in timeseries test
-
- Closed
-
- is depended on by
-
SERVER-117472 Update default 2dsphereIndexVersion in list_catalog_stage_consistency
-
- Closed
-
- is related to
-
SERVER-84794 $geoWithin queries have missing results when location field has extra sub-fields
-
- Closed
-
-
WT-9058 Key out of order detected on arm64
-
- Closed
-
- related to
-
SERVER-121126 Pin 2dsphere index version in clustered_collection_creation test
-
- Closed
-
-
SERVER-121192 Pin 2dsphereIndexVersion to v3 in timeseries_special_indexes_metadata
-
- Closed
-
-
SERVER-118561 Remove 2dsphereIndexVersion3 from timeseries jstests once 9.0 becomes last LTS version
-
- Backlog
-
-
SERVER-116109 Include more information for text index inconsistencies for validate
-
- Closed
-