Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-34450

db.setProfilingLevel(2) and secondaryPreferred

    • Type: Icon: Question Question
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.4.12
    • Component/s: Logging
    • Labels:
      None

      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.

            Assignee:
            kelsey.schubert@mongodb.com Kelsey Schubert
            Reporter:
            mbiamonte@xapo.com Martin Biamonte
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: