Replica Support #7

Open
msaffitz opened this Issue Sep 28, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@msaffitz

Can I use dex to profile against a secondary in a replica set? I'm currently getting errors trying to do that:

Total entries read: 0
Understood entries: 0
Unique recommendations: 0
Entries impacted by recommendations: 0
{
    "linesPassed": 0, 
    "linesRecommended": 0, 
    "results": [], 
    "uniqueRecommendations": 0, 
    "linesProcessed": 0
}
Traceback (most recent call last):
  File "/usr/local/share/python/dex", line 147, in <module>
    main(sys.argv[1:])
  File "/usr/local/share/python/dex", line 129, in main
    return md.watch_profile()
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dex/dex.py", line 194, in watch_profile
    for profile_entry in self._tail_profile(db, WATCH_INTERVAL_SECONDS):
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dex/dex.py", line 279, in _tail_profile
    latest_doc = db['system.profile'].find_one()
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pymongo/collection.py", line 516, in find_one
    for result in self.find(spec_or_id, *args, **kwargs).limit(-1):
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pymongo/cursor.py", line 778, in next
    if len(self.__data) or self._refresh():
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pymongo/cursor.py", line 729, in _refresh
    self.__uuid_subtype))
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pymongo/cursor.py", line 686, in __send_message
    self.__uuid_subtype)
  File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pymongo/helpers.py", line 102, in _unpack_response
    raise AutoReconnect("master has changed")
AutoReconnect: master has changed

@ghost ghost assigned esedor Sep 28, 2012

@esedor

This comment has been minimized.

Show comment Hide comment
@esedor

esedor Sep 28, 2012

Contributor

An excellent question! No, you currently cannot, but this should be a simple matter of having dex take a flag and pass the appropriate readpreference/slaveok value in the pymongo calls. I will see about tossing that in!

Contributor

esedor commented Sep 28, 2012

An excellent question! No, you currently cannot, but this should be a simple matter of having dex take a flag and pass the appropriate readpreference/slaveok value in the pymongo calls. I will see about tossing that in!

@msaffitz

This comment has been minimized.

Show comment Hide comment
@msaffitz

msaffitz Sep 28, 2012

Cool, thank you!

Cool, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment