[SERVER-29592] Matcher must reject $jsonSchema during parsing if featureCompatibilityVersion is "3.4" Created: 12/Jun/17  Updated: 30/Oct/23  Resolved: 31/Aug/17

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 3.5.13

Type: Task Priority: Major - P3
Reporter: Kyle Suarez Assignee: Justin Seyster
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-29571 Implement parser for a subset of JSON... Closed
depends on SERVER-29350 Bump featureCompatibilityVersion to 3.6 Closed
Backwards Compatibility: Fully Compatible
Sprint: Query 2017-08-21, Query 2017-09-11
Participants:
Linked BF Score: 0

 Comments   
Comment by Githook User [ 01/Sep/17 ]

Author:

{'username': 'jseyster', 'name': 'Justin Seyster', 'email': 'justin.seyster@mongodb.com'}

Message: SERVER-29592 Mark JSON Schema FCV tests as [requires_persistence].

This should fix the
json_schema_initial_sync_with_feature_compatibility failures in the
inMemory configurations.
Branch: master
https://github.com/mongodb/mongo/commit/edfcb9cfbef2f0bcd85cd46cb1b9ccbe89d0f299

Comment by Justin Seyster [ 30/Aug/17 ]

We decided to ban $jsonSchema in validators, because adding a $jsonSchema validator to a collection will cause problems if there are 3.4 nodes in a replica set, and because the existence of a $jsonSchema validator prevents the user from downgrading a 3.6 node to 3.4.

The problems with using $jsonSchema in find and aggregate commands are not as serious. The worst case is a user finding that the command fails with an error (e.g., because the command ends up querying a 3.4 node in the replica set). Our current plan is to continue allowing $jsonSchema in find and aggregate commands regardless of the feature compatibility version.

We can still decide in the future that we want to ban all uses of $jsonSchema when the feature compatibility version is 3.4.

Comment by Tess Avitabile (Inactive) [ 29/Aug/17 ]

Can you update the ticket to say that we are only banning $jsonSchema from collection validators (i.e. not in the find command)?

Comment by Kyle Suarez [ 07/Jul/17 ]

It could also reject all of the $_internalSchema* MatchExpressions, but most important is to reject the user-facing one.

Generated at Thu Feb 08 04:21:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.