[SERVER-40364] [FLE] Test that mongocryptd works correctly for OP_MSG write commands which don't use document sequences Created: 27/Mar/19  Updated: 06/Dec/22  Resolved: 02/Nov/22

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

Type: Task Priority: Major - P3
Reporter: David Storch Assignee: Backlog - Query Optimization
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Optimization
Sprint: Query 2019-05-06
Participants:

 Description   

The shell's runCommand() method ends up automatically upconverting batch inserts, updates, and deletes to use OP_MSG document sequences. Therefore, we currently only have test coverage through the shell of document sequences. We need to test that the mongocryptd daemon also works correctly when the body of the command contains an array of write statements.



 Comments   
Comment by Jacob Evans [ 02/Nov/22 ]

Closing this since monocryptd is deprecated.

Comment by Mark Benvenuto [ 01/Apr/19 ]

I think you are right. A C++ integration should work. You could use AsyncDBClient which does not go through rpc::upconvertRequest.

It will take a bit of effort though.

  • Add a new mongocryptd integration test
  • Filter this test out of the existing integration suites
  • Create a new mongocryptd fixture for resmoke to 
  • Create a new mongocryptd yml integration test suite
Comment by David Storch [ 01/Apr/19 ]

mark.benvenuto, I think this test coverage is valuable. Perhaps a C++ integration test would be best? I'm not sure how easy it would be to test mongocryptd with a C++ integration test right now. The only other option I see would be to add a way to suppress upconversion to document sequences in the shell. It might be helpful for us to talk in person.

Comment by Mark Benvenuto [ 28/Mar/19 ]

It is not possible to test as an end-to-end test with the shell.

When the shell's DBClientBase sends a OP_MSG to the server, it "up converts" the message. This means transforming insert commands into documents sequences.

When the server receives a legacy request (i.e. OP_QUERY), it converts it to OP_MSG and "up_converts" it as described above. 
 

Comment by David Storch [ 27/Mar/19 ]

mark.benvenuto, what's the best way to achieve the test coverage tracked by this ticket? I didn't see an existing mechanism to suppress automatic upconversion to document sequences, but we could build one into the shell.

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