[SERVER-79520] QE fails with sharded upsert on non-shard key Created: 31/Jul/23 Updated: 29/Oct/23 Resolved: 18/Aug/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Queryable Encryption |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mark Benvenuto | Assignee: | Erwin Pe |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Assigned Teams: |
Server Security
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Backport Requested: |
v7.0
|
||||||||||||||||||||
| Steps To Reproduce: | import {EncryptedClient} from "jstests/fle2/libs/encrypted_client_util.js"; function runTest(conn) { let dbName = 'basic_update'; let client = new EncryptedClient(conn, dbName); assert.commandWorked(client.createEncryptionCollection("basic", { let resShard = edb.adminCommand({enableSharding: edb.getName()}); // enableSharding may only be called once for a database. let shardCollCmd = { shardCollection: edb.getName() + ".basic", key: \{_id: "hashed"}, resShard = edb.adminCommand(shardCollCmd); jsTestLog("Sharding: " + tojson(shardCollCmd)); assert.commandWorked(edb.basic.insert({"_id": 1, "first": "mark", "last": "marco"})); // Add a document via upsert , u: {"last": "Marco", "first": "Luke"}, upsert: true}] jsTestLog("Sharding: Testing fle2 contention on update"); { const st = new ShardingTest(\{shards: 2, mongos: 1, config: 1}); runTest(st.s, st.shard0); st.stop(); |
||||||||||||||||||||
| Sprint: | Security 2023-08-21 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
QE sharded upsert on a non-shard key goes though a different code path. As part of this code path, it does not set `encryptionInformation.setCrudProcessed` and so the upsert gets blocked. |
| Comments |
| Comment by Githook User [ 18/Aug/23 ] |
|
Author: {'name': 'Erwin Pe', 'email': 'erwin.pe@mongodb.com', 'username': 'erwee'}Message: |