[SERVER-60354] Updates should log the original command in system.profile Created: 30/Sep/21 Updated: 02/Feb/24 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Alya Berciu | Assignee: | Backlog - Query Integration |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | neweng, qi-query-stats | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Integration
|
| Participants: |
| Description |
|
When testing update command routing it would be helpful to be able to obtain the shardVersion from the profiler to confirm that targeted updates are versioned and updates that are sent to every shard are unversioned. |
| Comments |
| Comment by Kyle Suarez [ 22/Oct/21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
david.storch is suggesting that instead of specifically adding the shard version here, we should just profile the full update/delete command in addition to the profiler entry for each individual statement. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kyle Suarez [ 20/Oct/21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks for the context arun.banala and alya.berciu, we're going to discuss this ticket once more in the triage meeting with this in mind. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Arun Banala [ 20/Oct/21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
kyle.suarez For most commands, we log the entire input BSON object (which includes generic parameters like shardVersion ) in the system.profile collection. But for updates( and deletes), we override it with only the single update operation of the input object. For example, a command field in the profiler entry of an insert would look like,
Where as the command field in the profiler entry for an update is
As you can see for update and delete commands, we seemed to be dropping a lot of useful information that is attached to the input BSON object. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alya Berciu [ 19/Oct/21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
kyle.suarez unfortunately, this is not the case for updates. This came up when I was testing | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kyle Suarez [ 19/Oct/21 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
alya.berciu, doesn't system.profile already contain this information, since the entire input command gets sent there? CC david.storch |