[SERVER-82889] Rate-limiting on view should be consistent across calls to registerRequest Created: 07/Nov/23  Updated: 20/Nov/23  Resolved: 15/Nov/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc0, 7.2.0-rc2

Type: Bug Priority: Major - P3
Reporter: Will Buerger Assignee: Erin Zhu
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-85111 Tracking: Known M2 correctness bugs Closed
Assigned Teams:
Query Integration
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.2
Participants:

 Description   

In the case of running a find or aggregate over a view, registerRequest will be called (at least) twice: once for the initial command, then once for the command with the resolved view pipeline. The operation should only be registered for query stats with the initial command; if the initial command is rate-limited though, it is possible for the resolved view command to not be rate limited. That should not be possible.
Created with Jira Integration+ for will.buerger (will.buerger@mongodb.com)



 Comments   
Comment by Githook User [ 20/Nov/23 ]

Author:

{'name': 'Erin Zhu', 'email': 'erin.zhu@mongodb.com', 'username': 'erinzhu001'}

Message: SERVER-82889: Fix rate limiting for views
Branch: v7.2
https://github.com/mongodb/mongo/commit/0ff87204ecb89305348771cb153b415ac435e713

Comment by Githook User [ 15/Nov/23 ]

Author:

{'name': 'Erin Zhu', 'email': 'erin.zhu@mongodb.com', 'username': 'erinzhu001'}

Message: SERVER-82889: Fix rate limiting for views
Branch: master
https://github.com/mongodb/mongo/commit/3c9352ad311e2b5b633bcc38f50fd1127e6ddd2e

Comment by Will Buerger [ 07/Nov/23 ]
Discussion captured from a Slack Channel - added by Integration+

charlie.swanson: then I realized, that code path is actually buggy if there's a rate limit, right? Couldn't you have the non-view operation be rate limited and then have the second time through not be rate limited?
will: oh no!!!!!!
will: that's a great point

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