[SERVER-34450] db.setProfilingLevel(2) and secondaryPreferred Created: 12/Apr/18  Updated: 23/Jul/18  Resolved: 21/Jun/18

Status: Closed
Project: Core Server
Component/s: Logging
Affects Version/s: 3.4.12
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Martin Biamonte Assignee: Kelsey Schubert
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

We have an application that's is running python using pymongo driver, in some collections we would like to use the readPreference feature, we are using it like this someCollections.objects(query).read_preference(ReadPreference.SECONDARY_PREFERRED).fir
The problem is that i can't see that the queries goes to the secondary nodes, i had enabled db.setProfilingLevel(2) and using db.system.profile.find() on the second nodes, but i always get an empty result .

How is the profiling features works with readPreferenrce setup on secondary nodes?.

Additional information: the connection configuration on pymongo doesn't have setup readPreference, because we would like to use just the readPrerence only on certain queries.



 Comments   
Comment by Kelsey Schubert [ 02/May/18 ]

HiĀ mbiamonte@xapo.com,

Please connect directly to each node, using the mongo shell, and execute db.setProfilingLevel(2) after ensuring that you're connected to the db that you want to profile.

Thanks,
Kelsey

Comment by Martin Biamonte [ 20/Apr/18 ]

Can you send me a procedure to connect to each node and setup db.setProfilingLevel(2)?, i'm not sure if i do it right.

Comment by Kelsey Schubert [ 13/Apr/18 ]

Hi mbiamonte@xapo.com,

I'm not able to reproduce this issue you describe. Would you please double check that you've executed db.setProfilingLevel(2) on all the nodes that you would like to enable profiling on? Please note this setting is not replicated, so I'd suggest connecting directly to each secondary and checking that they are appropriately configured using db.getProfilingLevel().

Kind regards,
Kelsey

Generated at Thu Feb 08 04:36:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.