[SERVER-39873] [FLE] Error if upsert would cause server-generated value Created: 27/Feb/19  Updated: 29/Oct/23  Resolved: 09/Apr/19

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

Type: Task Priority: Major - P3
Reporter: Nicholas Zolnierz Assignee: Ted Tuckman
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-39233 [FLE] Implement method for replacing ... Closed
depends on SERVER-39253 [FLE] Handle $set to an object with e... Closed
depends on SERVER-39257 [FLE] Handle encrypted field in $set Closed
depends on SERVER-39277 [FLE] Implement translation for repla... Closed
Backwards Compatibility: Fully Compatible
Sprint: Query 2019-04-08, Query 2019-04-22
Participants:

 Description   

In some cases, an update command with the {upsert: true} flag could result in the server generating an _id field. If this is true, and the schema indicates that _id is encrypted, then mongocryptd must return an error. As part of this ticket we should also:

  1. Determine whether this work will be necessary for findAndModify, once mongocryptd also supports findAndModify.
  2. Confirm that the server does not choose new values for top-level Timestamp(0,0) for upserts. We believe this behavior is insert-specific, but we need to confirm.
  3. Confirm that full document replacement-style updates will autogenerate current time from Timestamp(0, 0).


 Comments   
Comment by Githook User [ 09/Apr/19 ]

Author:

{'name': 'Ted Tuckman', 'username': 'TedTuckman', 'email': 'ted.tuckman@mongodb.com'}

Message: SERVER-39873 Error if upsert would cause server-generated value
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/da6757ddf9485fa216bb3f205ae64404016c2c4a

Comment by Nicholas Zolnierz [ 06/Mar/19 ]

This ticket should also handle updates/upserts involving encrypted fields which are auto-generated by mongod (SERVER-39855 for insert).

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