Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes: #8466
A new set of Parse Config options were added in v6 to
databaseOptions
called enableSchemaHooks and schemaCacheTtl. However, these options are not strictly speaking database options, they instead manage Parse's internal behaviour with relation to the database. This means that MongoDB doesn't recognise these options and so, they must not be passed into the MongoDB client constructor.This was correctly handled in the MongoStorageAdapter where the new, non-mongodb options are deleted - Screenshot 1 before they're used as MongoDB client options.
However, there remains another area where the unsupported options are passed to a MongoDB client. You can see in Screenshot 2 that
_mongoOptions
is used directly when connecting to the MongoDB client in the GridFSBucketAdapter.This is where an error is thrown (screenshots 3 and 4) if a Parse Server uses the new
enableSchemaHooks
orschemaCacheTtl
options.Screenshot 1
Screenshot 2
Screenshot 3
Screenshot 4