[SERVER-75062] Telemetry rate limiting is (accidentally) not adjustable at runtime Created: 20/Mar/23  Updated: 29/Oct/23  Resolved: 03/Apr/23

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

Type: Bug Priority: Major - P3
Reporter: Charlie Swanson Assignee: Alyssa Clark
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-71531 Add updater to telemetry sampling rat... Closed
is duplicated by SERVER-75415 Complete TODO listed in SERVER-71531 Closed
Assigned Teams:
Query Optimization
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

Start up the server with the rate limit set to 0.

MongoDB Enterprise > db.foo.find()
{ "_id" : ObjectId("641353d2b7e0f465c4fcfb3a"), "x" : 1, "y" : 1 }
{ "_id" : ObjectId("6414ace59f2e023fd915d78e") }
{ "_id" : ObjectId("6414ace59f2e023fd915d78f") }
{ "_id" : ObjectId("6414ace59f2e023fd915d790") }
{ "_id" : ObjectId("6414ace59f2e023fd915d791") }
{ "_id" : ObjectId("6414ace59f2e023fd915d792") }
MongoDB Enterprise > db.foo.find({x: 1})
{ "_id" : ObjectId("641353d2b7e0f465c4fcfb3a"), "x" : 1, "y" : 1 }
MongoDB Enterprise > db.foo.aggregate([{$set: {z: true}}])
{ "_id" : ObjectId("641353d2b7e0f465c4fcfb3a"), "x" : 1, "y" : 1, "z" : true }
{ "_id" : ObjectId("6414ace59f2e023fd915d78e"), "z" : true }
{ "_id" : ObjectId("6414ace59f2e023fd915d78f"), "z" : true }
{ "_id" : ObjectId("6414ace59f2e023fd915d790"), "z" : true }
{ "_id" : ObjectId("6414ace59f2e023fd915d791"), "z" : true }
{ "_id" : ObjectId("6414ace59f2e023fd915d792"), "z" : true }
MongoDB Enterprise > db.getSiblingDB("admin").aggregate([{$telemetry: {}}])
 
 
 
// I _can_ configure the rate limit, it appears:
 
 
MongoDB Enterprise > db.adminCommand({setParameter: 1, internalQueryConfigureTelemetrySamplingRate: 37410})
{ "was" : 0, "ok" : 1 }
MongoDB Enterprise > db.foo.aggregate([{$set: {z: true}}])
{ "_id" : ObjectId("641353d2b7e0f465c4fcfb3a"), "x" : 1, "y" : 1, "z" : true }
{ "_id" : ObjectId("6414ace59f2e023fd915d78e"), "z" : true }
{ "_id" : ObjectId("6414ace59f2e023fd915d78f"), "z" : true }
{ "_id" : ObjectId("6414ace59f2e023fd915d790"), "z" : true }
{ "_id" : ObjectId("6414ace59f2e023fd915d791"), "z" : true }
{ "_id" : ObjectId("6414ace59f2e023fd915d792"), "z" : true }
MongoDB Enterprise > db.foo.aggregate([{$set: {z: true}}])
{ "_id" : ObjectId("641353d2b7e0f465c4fcfb3a"), "x" : 1, "y" : 1, "z" : true }
{ "_id" : ObjectId("6414ace59f2e023fd915d78e"), "z" : true }
{ "_id" : ObjectId("6414ace59f2e023fd915d78f"), "z" : true }
{ "_id" : ObjectId("6414ace59f2e023fd915d790"), "z" : true }
{ "_id" : ObjectId("6414ace59f2e023fd915d791"), "z" : true }
{ "_id" : ObjectId("6414ace59f2e023fd915d792"), "z" : true }
MongoDB Enterprise > db.foo.find({x: 1})
{ "_id" : ObjectId("641353d2b7e0f465c4fcfb3a"), "x" : 1, "y" : 1 }
MongoDB Enterprise > db.foo.find()
{ "_id" : ObjectId("641353d2b7e0f465c4fcfb3a"), "x" : 1, "y" : 1 }
{ "_id" : ObjectId("6414ace59f2e023fd915d78e") }
{ "_id" : ObjectId("6414ace59f2e023fd915d78f") }
{ "_id" : ObjectId("6414ace59f2e023fd915d790") }
{ "_id" : ObjectId("6414ace59f2e023fd915d791") }
{ "_id" : ObjectId("6414ace59f2e023fd915d792") }
MongoDB Enterprise > db.getSiblingDB("admin").aggregate([{$telemetry: {}}]) 

The bug is that last line was expected to output telemetry for the previous finds and aggregate

Sprint: QI 2023-04-03, QI 2023-04-17
Participants:

 Description   

There is a parameter that can be adjusted at runtime, but it has no effect. It appears the rate limit is analyzed at startup and read once in order to configure a rate limiting C++ class. When you change the parameter, nothing observes this change.



 Comments   
Comment by Githook User [ 03/Apr/23 ]

Author:

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

Message: SERVER-75062 Allow telemetry sampling rate to be adjusted at runtime
Branch: master
https://github.com/mongodb/mongo/commit/51e2b07895accc3e412f7f1d3ccc323451ea63fe

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