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

db.setProfilingLevel(2) and secondaryPreferred

    XMLWordPrintableJSON

Details

    • Icon: Question Question
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 3.4.12
    • Logging
    • None

    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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: