[SERVER-85374] Analyze command is not reparseable Created: 18/Jan/24  Updated: 25/Jan/24  Resolved: 25/Jan/24

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 8.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Alyssa Clark Assignee: Alyssa Clark
Resolution: Fixed Votes: 0
Labels: flag-for-2885-backport
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-85503 Add an open()-like API to DocumentSou... Backlog
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:
Linked BF Score: 45

 Description   

The analyze command runs an aggregation pipeline that is not reparseable. Specifically:

  • The $_internalConstructStats.sampleRate accumulator field does not re-parse.
  • The $merge into system.statistics.<collection> fails this assertion during re-parsing because $queryStats doesn't use an internal client.
  • This assertion (also for the $_internalConstructStats accumulator) fails during re-parsing because $queryStats doesn't use an internal client.

Note that the analyze command is feature flag guarded so this is currently a test-only issue.

We don't particularly care about getting query stats for the analyze command, so we will disable collecting query stats when the request is coming from an internal client (there are no other querying situations that we know of that will be excluded from doing this - it appears to be an infrequently used flag).



 Comments   
Comment by Githook User [ 25/Jan/24 ]

Author:

{'name': 'Alyssa Wagenmaker', 'email': 'alyssa.clark@mongodb.com', 'username': 'awagenmaker'}

Message: SERVER-85374 Don't collect query stats for internal clients (#18219)

GitOrigin-RevId: dc9fda08a954d312138e8c776dbf2e4033a6b119
Branch: master
https://github.com/mongodb/mongo/commit/0c66829314187f1ab47798287a9fafb4f0f09e04

Generated at Thu Feb 08 06:57:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.