[SERVER-77850] Enforce expectPrefix serialization in $currentOp Created: 06/Jun/23 Updated: 29/Oct/23 Resolved: 16/Jun/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.1.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Hugh Tong (Inactive) | Assignee: | Hugh Tong (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Server Serverless 2023-06-26 | ||||||||
| Participants: | |||||||||
| Description |
|
The native_tenant_data_isolation_curr_op.js test is failing when command serialization/deserialization plumbed in. It's possible the SerializationContext objects being passed in are configured incorrectly when CurOp::reportState() (which should be serializing command replies) is being called, so we may need to look at the call stack and see which callers are generating the SerializationContext objects. |
| Comments |
| Comment by Githook User [ 16/Jun/23 ] |
|
Author: {'name': 'Hugh Tong', 'email': 'hugh.tong@mongodb.com', 'username': 'cortrain'}Message: |
| Comment by Hugh Tong (Inactive) [ 06/Jun/23 ] |
|
It appears some operations register themselves with the curop object when they call CurOp::setOpDescription_inlock()or CurOp::setGenericOpRequestDetails(), this can happen before the $currentOp or currentOp commands are issued, and will deserialize to a "$db" field that will not respect the 'expectPrefix' field later issued in the $currentOp or currentOp command. One way around this is to store the tenantId in a separate field during the call to serializeDollarDbInOpDescription(), then later assemble the description according to the serialization context in the $currentOp or currentOp request, but given our recent discussions with the Atlas Proxy team we may hold off on this until we receive some clarification on their direction, namely the requirement to prefix tenantIds in responses if expectPrefix=true. |