Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-263

Cannot query GridFS against a slave

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.1
    • Affects Version/s: 1.11
    • Component/s: None
    • None
    • Fully Compatible

      Similar to PHP-136, the pymongo driver should allow querying a GridFS collection from a slave. Currently, if one attempts to open a GridFS object on a slave connection, a traceback is returned:

      Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/home/jaraco/envs/beta/lib/python2.7/site-packages/pymongo-1.11-py2.7-linux-x86_64.egg/gridfs/_init.py", line 58, in __init_
      unique=True)
      File "/home/jaraco/envs/beta/lib/python2.7/site-packages/pymongo-1.11-py2.7-linux-x86_64.egg/pymongo/collection.py", line 724, in ensure_index
      ttl, **kwargs)
      File "/home/jaraco/envs/beta/lib/python2.7/site-packages/pymongo-1.11-py2.7-linux-x86_64.egg/pymongo/collection.py", line 646, in create_index
      safe=True)
      File "/home/jaraco/envs/beta/lib/python2.7/site-packages/pymongo-1.11-py2.7-linux-x86_64.egg/pymongo/collection.py", line 275, in insert
      check_keys, safe, kwargs), safe)
      File "/home/jaraco/envs/beta/lib/python2.7/site-packages/pymongo-1.11-py2.7-linux-x86_64.egg/pymongo/connection.py", line 774, in _send_message
      raise AutoReconnect(str(e))
      pymongo.errors.AutoReconnect: not master

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            jason.coombs@yougov.com Jason R. Coombs
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: