Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replica Support #7

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

Replica Support #7

msaffitz opened this issue Sep 28, 2012 · 2 comments
Assignees

Comments

@msaffitz
Copy link

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
Copy link
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
Copy link
Author

Cool, thank you!

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

No branches or pull requests

2 participants