#3806 handle AutoReconnect to allura & gutenberg

unreleased
invalid
None
General
2015-01-29
2012-02-24
No
Traceback (most recent call last):
  File "/var/local/env-allura/lib/python2.7/site-packages/Paste-1.7.5.1-py2.7.egg/paste/registry.py", line 409, in streaming_iter
    for item in self.application(environ, start_response):
  File "/var/local/env-allura/lib/python2.7/site-packages/Ming-0.2.2dev_20120202-py2.7.egg/ming/orm/middleware.py", line 16, in __call__
    result = self.app(environ, start_response)
  File "/var/local/allura/Allura/allura/lib/custom_middleware.py", line 41, in __call__
    return self.app(environ, start_response)
  File "/var/local/allura/Allura/allura/config/middleware.py", line 153, in SchemeMiddleware
    return app(environ, start_response)
  File "/var/local/env-allura/lib/python2.7/site-packages/EasyWidgets-0.2dev_20110726-py2.7.egg/ew/middleware.py", line 65, in __call__
    result = self.app(environ, start_response)
  File "/var/local/allura/Allura/allura/lib/custom_middleware.py", line 151, in __call__
    resp = req.get_response(self.app)
  File "/var/local/env-allura/lib/python2.7/site-packages/WebOb-1.1.1-py2.7.egg/webob/request.py", line 1086, in get_response
    application, catch_exc_info=False)
  File "/var/local/env-allura/lib/python2.7/site-packages/WebOb-1.1.1-py2.7.egg/webob/request.py", line 1055, in call_application
    app_iter = application(self.environ, start_response)
  File "/var/local/allura/Allura/allura/config/middleware.py", line 162, in AlluraGlobalsMiddleware
    return app(environ, start_response)
  File "/var/local/allura/Allura/allura/lib/custom_middleware.py", line 120, in __call__
    return self._app(environ, session_start_response)
  File "/var/local/allura/Allura/allura/lib/custom_middleware.py", line 200, in __call__
    resp = req.get_response(self.app, catch_exc_info=self.debug)
  File "/var/local/env-allura/lib/python2.7/site-packages/WebOb-1.1.1-py2.7.egg/webob/request.py", line 1086, in get_response
    application, catch_exc_info=False)
  File "/var/local/env-allura/lib/python2.7/site-packages/WebOb-1.1.1-py2.7.egg/webob/request.py", line 1055, in call_application
    app_iter = application(self.environ, start_response)
  File "/var/local/allura/Allura/allura/lib/custom_middleware.py", line 78, in __call__
    self.app, environ, catch_exc_info=True)
  File "/var/local/env-allura/lib/python2.7/site-packages/Pylons-1.0-py2.7.egg/pylons/util.py", line 48, in call_wsgi_application
    app_iter = application(environ, start_response)
  File "/var/local/env-allura/lib/python2.7/site-packages/Pylons-1.0-py2.7.egg/pylons/middleware.py", line 163, in __call__
    self.app, new_environ, catch_exc_info=True)
  File "/var/local/env-allura/lib/python2.7/site-packages/Pylons-1.0-py2.7.egg/pylons/util.py", line 48, in call_wsgi_application
    app_iter = application(environ, start_response)
  File "/var/local/env-allura/lib/python2.7/site-packages/WebError-0.10.3-py2.7.egg/weberror/errormiddleware.py", line 156, in __call__
    return self.application(environ, start_response)
  File "/var/local/env-allura/lib/python2.7/site-packages/Beaker-1.5.4-py2.7.egg/beaker/middleware.py", line 152, in __call__
    return self.wrap_app(environ, session_start_response)
  File "/var/local/env-allura/lib/python2.7/site-packages/Routes-1.12.3-py2.7.egg/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/var/local/forge-classic/sfx/middleware.py", line 37, in __call__
    resp = request.get_response(self.app)
  File "/var/local/env-allura/lib/python2.7/site-packages/WebOb-1.1.1-py2.7.egg/webob/request.py", line 1086, in get_response
    application, catch_exc_info=False)
  File "/var/local/env-allura/lib/python2.7/site-packages/WebOb-1.1.1-py2.7.egg/webob/request.py", line 1055, in call_application
    app_iter = application(self.environ, start_response)
  File "/var/local/env-allura/lib/python2.7/site-packages/Pylons-1.0-py2.7.egg/pylons/wsgiapp.py", line 106, in __call__
    controller = self.resolve(environ, start_response)
  File "/var/local/env-allura/lib/python2.7/site-packages/Pylons-1.0-py2.7.egg/pylons/wsgiapp.py", line 239, in resolve
    return self.find_controller(controller)
  File "/var/local/env-allura/lib/python2.7/site-packages/TurboGears2-2.1.3-py2.7.egg/tg/wsgiapp.py", line 37, in find_controller
    __import__(full_module_name)
  File "/var/local/allura/Allura/allura/controllers/root.py", line 28, in <module>
    from .project import NeighborhoodController, HostNeighborhoodController
  File "/var/local/allura/Allura/allura/controllers/project.py", line 36, in <module>
    class W:
  File "/var/local/allura/Allura/allura/controllers/project.py", line 39, in W
    add_project = plugin.ProjectRegistrationProvider.get().add_project_widget(antispam=True)
  File "/var/local/allura/Allura/allura/lib/plugin.py", line 280, in get
    return app_globals.Globals().entry_points['registration'][method]()
  File "/var/local/forge-classic/sfx/sfx_main.py", line 140, in __init__
    self.api = SFXProjectApi()
  File "/var/local/forge-classic/sfx/lib/sfx_api.py", line 147, in __init__
    n = M.Neighborhood.query.get(name='Users')
  File "/var/local/env-allura/lib/python2.7/site-packages/Ming-0.2.2dev_20120202-py2.7.egg/ming/orm/mapper.py", line 264, in get
    return self.find(kwargs).first()
  File "/var/local/env-allura/lib/python2.7/site-packages/Ming-0.2.2dev_20120202-py2.7.egg/ming/orm/ormsession.py", line 320, in first
    return self.next()
  File "/var/local/allura/Allura/allura/lib/stats.py", line 57, in inner
    return func(*l, **kw)
  File "/var/local/env-allura/lib/python2.7/site-packages/Ming-0.2.2dev_20120202-py2.7.egg/ming/orm/ormsession.py", line 273, in next
    return self._next_impl()
  File "/var/local/env-allura/lib/python2.7/site-packages/Ming-0.2.2dev_20120202-py2.7.egg/ming/orm/ormsession.py", line 252, in _next_impl
    doc = self.ming_cursor.next()
  File "/var/local/env-allura/lib/python2.7/site-packages/Ming-0.2.2dev_20120202-py2.7.egg/ming/base.py", line 56, in next
    doc = self.cursor.next()
  File "/var/local/allura/Allura/allura/lib/stats.py", line 57, in inner
    return func(*l, **kw)
  File "/var/local/env-allura/lib/python2.7/site-packages/pymongo-2.1.1-py2.7-linux-x86_64.egg/pymongo/cursor.py", line 703, in next
    if len(self.__data) or self._refresh():
  File "/var/local/env-allura/lib/python2.7/site-packages/pymongo-2.1.1-py2.7-linux-x86_64.egg/pymongo/cursor.py", line 666, in _refresh
    self.__uuid_subtype))
  File "/var/local/env-allura/lib/python2.7/site-packages/pymongo-2.1.1-py2.7-linux-x86_64.egg/pymongo/cursor.py", line 628, in __send_message
    self.__tz_aware)
  File "/var/local/env-allura/lib/python2.7/site-packages/pymongo-2.1.1-py2.7-linux-x86_64.egg/pymongo/helpers.py", line 99, in _unpack_response
    raise AutoReconnect("master has changed")
AutoReconnect: master has changed

And the gutenberg trace from the reactor/taskd service:

16:06:28,602 ERROR [allura.command] Taskd, restart in 10s
Traceback (most recent call last):
  File "/var/local/allura/Allura/allura/command/taskd.py", line 66, in worker
    list(wsgi_app(r.environ, start_response))
  File "/var/local/env-allura/lib/python2.7/site-packages/Paste-1.7.5.1-py2.7.egg/paste/registry.py", line 409, in streaming_iter
    for item in self.application(environ, start_response):
  File "/var/local/env-allura/lib/python2.7/site-packages/Ming-0.2.2dev_20120202-py2.7.egg/ming/orm/middleware.py", line 16, in __call__
    result = self.app(environ, start_response)
  File "/var/local/allura/Allura/allura/lib/custom_middleware.py", line 41, in __call__
    return self.app(environ, start_response)
  File "/var/local/allura/Allura/allura/config/middleware.py", line 153, in SchemeMiddleware
    return app(environ, start_response)
  File "/var/local/env-allura/lib/python2.7/site-packages/EasyWidgets-0.2dev_20110726-py2.7.egg/ew/middleware.py", line 65, in __call__
    result = self.app(environ, start_response)
  File "/var/local/allura/Allura/allura/lib/custom_middleware.py", line 151, in __call__
    resp = req.get_response(self.app)
  File "/var/local/env-allura/lib/python2.7/site-packages/WebOb-1.1.1-py2.7.egg/webob/request.py", line 1086, in get_response
    application, catch_exc_info=False)
  File "/var/local/env-allura/lib/python2.7/site-packages/WebOb-1.1.1-py2.7.egg/webob/request.py", line 1055, in call_application
    app_iter = application(self.environ, start_response)
  File "/var/local/allura/Allura/allura/config/middleware.py", line 162, in AlluraGlobalsMiddleware
    return app(environ, start_response)
  File "/var/local/allura/Allura/allura/lib/custom_middleware.py", line 120, in __call__
    return self._app(environ, session_start_response)
  File "/var/local/allura/Allura/allura/lib/custom_middleware.py", line 200, in __call__
    resp = req.get_response(self.app, catch_exc_info=self.debug)
  File "/var/local/env-allura/lib/python2.7/site-packages/WebOb-1.1.1-py2.7.egg/webob/request.py", line 1086, in get_response
    application, catch_exc_info=False)
  File "/var/local/env-allura/lib/python2.7/site-packages/WebOb-1.1.1-py2.7.egg/webob/request.py", line 1055, in call_application
    app_iter = application(self.environ, start_response)
  File "/var/local/allura/Allura/allura/lib/custom_middleware.py", line 78, in __call__
    self.app, environ, catch_exc_info=True)
  File "/var/local/env-allura/lib/python2.7/site-packages/Pylons-1.0-py2.7.egg/pylons/util.py", line 48, in call_wsgi_application
    app_iter = application(environ, start_response)
  File "/var/local/env-allura/lib/python2.7/site-packages/Pylons-1.0-py2.7.egg/pylons/middleware.py", line 163, in __call__
    self.app, new_environ, catch_exc_info=True)
  File "/var/local/env-allura/lib/python2.7/site-packages/Pylons-1.0-py2.7.egg/pylons/util.py", line 48, in call_wsgi_application
    app_iter = application(environ, start_response)
  File "/var/local/env-allura/lib/python2.7/site-packages/WebError-0.10.3-py2.7.egg/weberror/errormiddleware.py", line 156, in __call__
    return self.application(environ, start_response)
  File "/var/local/env-allura/lib/python2.7/site-packages/Beaker-1.5.4-py2.7.egg/beaker/middleware.py", line 152, in __call__
    return self.wrap_app(environ, session_start_response)
  File "/var/local/env-allura/lib/python2.7/site-packages/Routes-1.12.3-py2.7.egg/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/var/local/forge-classic/sfx/middleware.py", line 37, in __call__
    resp = request.get_response(self.app)
  File "/var/local/env-allura/lib/python2.7/site-packages/WebOb-1.1.1-py2.7.egg/webob/request.py", line 1086, in get_response
    application, catch_exc_info=False)
  File "/var/local/env-allura/lib/python2.7/site-packages/WebOb-1.1.1-py2.7.egg/webob/request.py", line 1055, in call_application
    app_iter = application(self.environ, start_response)
  File "/var/local/env-allura/lib/python2.7/site-packages/Pylons-1.0-py2.7.egg/pylons/wsgiapp.py", line 107, in __call__
    response = self.dispatch(controller, environ, start_response)
  File "/var/local/env-allura/lib/python2.7/site-packages/Pylons-1.0-py2.7.egg/pylons/wsgiapp.py", line 312, in dispatch
    return controller(environ, start_response)
  File "/var/local/allura/Allura/allura/controllers/task.py", line 11, in __call__
    result = task(restore_context=False)
  File "/var/local/allura/Allura/allura/model/monq_model.py", line 219, in __call__
    self.result = func(*self.args, **self.kwargs)
  File "/var/local/allura/Allura/allura/tasks/event_tasks.py", line 11, in event
    t(event_type, *args, **kwargs)
  File "/var/local/forge-classic/sfx/sfx_main.py", line 225, in project_updated
    api.update(pylons.c.user, pylons.c.project)
  File "/var/local/forge-classic/sfx/lib/sfx_api.py", line 230, in update
    self._update_gutenberg(p)
  File "/var/local/forge-classic/sfx/lib/sfx_api.py", line 351, in _update_gutenberg
    'shortname': p.get_tool_data('sfx', 'unix_group_name')})
  File "/var/local/allura/Allura/allura/lib/stats.py", line 57, in inner
    return func(*l, **kw)
  File "/var/local/env-allura/lib/python2.7/site-packages/pymongo-2.1.1-py2.7-linux-x86_64.egg/pymongo/collection.py", line 520, in find_one
    for result in self.find(spec_or_id, *args, **kwargs).limit(-1):
  File "/var/local/allura/Allura/allura/lib/stats.py", line 57, in inner
    return func(*l, **kw)
  File "/var/local/env-allura/lib/python2.7/site-packages/pymongo-2.1.1-py2.7-linux-x86_64.egg/pymongo/cursor.py", line 703, in next
    if len(self.__data) or self._refresh():
  File "/var/local/env-allura/lib/python2.7/site-packages/pymongo-2.1.1-py2.7-linux-x86_64.egg/pymongo/cursor.py", line 666, in _refresh
    self.__uuid_subtype))
  File "/var/local/env-allura/lib/python2.7/site-packages/pymongo-2.1.1-py2.7-linux-x86_64.egg/pymongo/cursor.py", line 628, in __send_message
    self.__tz_aware)
  File "/var/local/env-allura/lib/python2.7/site-packages/pymongo-2.1.1-py2.7-linux-x86_64.egg/pymongo/helpers.py", line 99, in _unpack_response
    raise AutoReconnect("master has changed")
AutoReconnect: master has changed

Related

Tickets: #3806

Discussion

  • Dave Brondsema

    Dave Brondsema - 2012-03-05
    • summary: handle AutoReconnect --> handle AutoReconnect to allura & gutenberg
    • Description has changed:

    Diff:

    --- old 
    +++ new 
    @@ -88,3 +88,90 @@
         raise AutoReconnect("master has changed")
     AutoReconnect: master has changed
     ~~~~
    +
    +
    +And the gutenberg trace from the reactor/taskd service:
    +
    +~~~~
    +16:06:28,602 ERROR [allura.command] Taskd, restart in 10s
    +Traceback (most recent call last):
    +  File "/var/local/allura/Allura/allura/command/taskd.py", line 66, in worker
    +    list(wsgi_app(r.environ, start_response))
    +  File "/var/local/env-allura/lib/python2.7/site-packages/Paste-1.7.5.1-py2.7.egg/paste/registry.py", line 409, in streaming_iter
    +    for item in self.application(environ, start_response):
    +  File "/var/local/env-allura/lib/python2.7/site-packages/Ming-0.2.2dev_20120202-py2.7.egg/ming/orm/middleware.py", line 16, in __call__
    +    result = self.app(environ, start_response)
    +  File "/var/local/allura/Allura/allura/lib/custom_middleware.py", line 41, in __call__
    +    return self.app(environ, start_response)
    +  File "/var/local/allura/Allura/allura/config/middleware.py", line 153, in SchemeMiddleware
    +    return app(environ, start_response)
    +  File "/var/local/env-allura/lib/python2.7/site-packages/EasyWidgets-0.2dev_20110726-py2.7.egg/ew/middleware.py", line 65, in __call__
    +    result = self.app(environ, start_response)
    +  File "/var/local/allura/Allura/allura/lib/custom_middleware.py", line 151, in __call__
    +    resp = req.get_response(self.app)
    +  File "/var/local/env-allura/lib/python2.7/site-packages/WebOb-1.1.1-py2.7.egg/webob/request.py", line 1086, in get_response
    +    application, catch_exc_info=False)
    +  File "/var/local/env-allura/lib/python2.7/site-packages/WebOb-1.1.1-py2.7.egg/webob/request.py", line 1055, in call_application
    +    app_iter = application(self.environ, start_response)
    +  File "/var/local/allura/Allura/allura/config/middleware.py", line 162, in AlluraGlobalsMiddleware
    +    return app(environ, start_response)
    +  File "/var/local/allura/Allura/allura/lib/custom_middleware.py", line 120, in __call__
    +    return self._app(environ, session_start_response)
    +  File "/var/local/allura/Allura/allura/lib/custom_middleware.py", line 200, in __call__
    +    resp = req.get_response(self.app, catch_exc_info=self.debug)
    +  File "/var/local/env-allura/lib/python2.7/site-packages/WebOb-1.1.1-py2.7.egg/webob/request.py", line 1086, in get_response
    +    application, catch_exc_info=False)
    +  File "/var/local/env-allura/lib/python2.7/site-packages/WebOb-1.1.1-py2.7.egg/webob/request.py", line 1055, in call_application
    +    app_iter = application(self.environ, start_response)
    +  File "/var/local/allura/Allura/allura/lib/custom_middleware.py", line 78, in __call__
    +    self.app, environ, catch_exc_info=True)
    +  File "/var/local/env-allura/lib/python2.7/site-packages/Pylons-1.0-py2.7.egg/pylons/util.py", line 48, in call_wsgi_application
    +    app_iter = application(environ, start_response)
    +  File "/var/local/env-allura/lib/python2.7/site-packages/Pylons-1.0-py2.7.egg/pylons/middleware.py", line 163, in __call__
    +    self.app, new_environ, catch_exc_info=True)
    +  File "/var/local/env-allura/lib/python2.7/site-packages/Pylons-1.0-py2.7.egg/pylons/util.py", line 48, in call_wsgi_application
    +    app_iter = application(environ, start_response)
    +  File "/var/local/env-allura/lib/python2.7/site-packages/WebError-0.10.3-py2.7.egg/weberror/errormiddleware.py", line 156, in __call__
    +    return self.application(environ, start_response)
    +  File "/var/local/env-allura/lib/python2.7/site-packages/Beaker-1.5.4-py2.7.egg/beaker/middleware.py", line 152, in __call__
    +    return self.wrap_app(environ, session_start_response)
    +  File "/var/local/env-allura/lib/python2.7/site-packages/Routes-1.12.3-py2.7.egg/routes/middleware.py", line 131, in __call__
    +    response = self.app(environ, start_response)
    +  File "/var/local/forge-classic/sfx/middleware.py", line 37, in __call__
    +    resp = request.get_response(self.app)
    +  File "/var/local/env-allura/lib/python2.7/site-packages/WebOb-1.1.1-py2.7.egg/webob/request.py", line 1086, in get_response
    +    application, catch_exc_info=False)
    +  File "/var/local/env-allura/lib/python2.7/site-packages/WebOb-1.1.1-py2.7.egg/webob/request.py", line 1055, in call_application
    +    app_iter = application(self.environ, start_response)
    +  File "/var/local/env-allura/lib/python2.7/site-packages/Pylons-1.0-py2.7.egg/pylons/wsgiapp.py", line 107, in __call__
    +    response = self.dispatch(controller, environ, start_response)
    +  File "/var/local/env-allura/lib/python2.7/site-packages/Pylons-1.0-py2.7.egg/pylons/wsgiapp.py", line 312, in dispatch
    +    return controller(environ, start_response)
    +  File "/var/local/allura/Allura/allura/controllers/task.py", line 11, in __call__
    +    result = task(restore_context=False)
    +  File "/var/local/allura/Allura/allura/model/monq_model.py", line 219, in __call__
    +    self.result = func(*self.args, **self.kwargs)
    +  File "/var/local/allura/Allura/allura/tasks/event_tasks.py", line 11, in event
    +    t(event_type, *args, **kwargs)
    +  File "/var/local/forge-classic/sfx/sfx_main.py", line 225, in project_updated
    +    api.update(pylons.c.user, pylons.c.project)
    +  File "/var/local/forge-classic/sfx/lib/sfx_api.py", line 230, in update
    +    self._update_gutenberg(p)
    +  File "/var/local/forge-classic/sfx/lib/sfx_api.py", line 351, in _update_gutenberg
    +    'shortname': p.get_tool_data('sfx', 'unix_group_name')})
    +  File "/var/local/allura/Allura/allura/lib/stats.py", line 57, in inner
    +    return func(*l, **kw)
    +  File "/var/local/env-allura/lib/python2.7/site-packages/pymongo-2.1.1-py2.7-linux-x86_64.egg/pymongo/collection.py", line 520, in find_one
    +    for result in self.find(spec_or_id, *args, **kwargs).limit(-1):
    +  File "/var/local/allura/Allura/allura/lib/stats.py", line 57, in inner
    +    return func(*l, **kw)
    +  File "/var/local/env-allura/lib/python2.7/site-packages/pymongo-2.1.1-py2.7-linux-x86_64.egg/pymongo/cursor.py", line 703, in next
    +    if len(self.__data) or self._refresh():
    +  File "/var/local/env-allura/lib/python2.7/site-packages/pymongo-2.1.1-py2.7-linux-x86_64.egg/pymongo/cursor.py", line 666, in _refresh
    +    self.__uuid_subtype))
    +  File "/var/local/env-allura/lib/python2.7/site-packages/pymongo-2.1.1-py2.7-linux-x86_64.egg/pymongo/cursor.py", line 628, in __send_message
    +    self.__tz_aware)
    +  File "/var/local/env-allura/lib/python2.7/site-packages/pymongo-2.1.1-py2.7-linux-x86_64.egg/pymongo/helpers.py", line 99, in _unpack_response
    +    raise AutoReconnect("master has changed")
    +AutoReconnect: master has changed
    +~~~~
    
     
  • Rick Copeland - 2012-03-15
    • status: open --> in-progress
    • assigned_to: Rick Copeland ☕
     
  • Rick Copeland - 2012-03-16
    • status: in-progress --> code-review
    • qa: Tim Van Steenburgh
     
  • Rick Copeland - 2012-03-16

    On ming rc/3806, there is a new option when configuring your datastore/engine (use_auto_retry).

    QA:

    • code review
    • sanity check on sandbox (edit a ticket, save it)
    • bounce the sandbox mongodb server and make server stays sane

    Then move to validation and make a change in production.ini to add the use_auto_retry=True value to the Ming config.

     
  • Dave Brondsema

    Dave Brondsema - 2012-03-16

    We should also test how the reactor process handles gutenberg autoreconnects (forge-classic event handler)

     
    • status: code-review --> in-progress
     
  • In order to QA this properly I need instructions for how to repro the problem on a sandbox. I tried setting up a 2-node + arbiter replica set and still couldn't reproduce it. When master goes offline I get "connection refused". When that node is restarted I get "not master". If I promote it back to master, normal functionality resumes.

    I don't know how to prove this code fixes anything if I can't repro the problem. Trying to repro with:

    mongo-1.8.2
    pymongo-2.1.1
    Ming-0.2.2dev_20120305
    

    On a related note, I attempted to get failover working properly with Ming-0.2.2dev_20120305. First I applied this patch to Ming:

    (env-allura)root@h6v6014:~/merciless/ming(master)$ git diff
    diff --git a/ming/__init__.py b/ming/__init__.py
    index fcf9d91..7ce792d 100644
    --- a/ming/__init__.py
    +++ b/ming/__init__.py
    @@ -34,6 +34,8 @@ def configure(**kwargs):
             tz_aware=validators.Bool(if_missing=False)
             slave_okay=validators.Bool(if_missing=False)
             max_pool_size=validators.Int(if_missing=10)
    +        read_preference=validators.Int(if_missing=1)
    +        replicaSet=validators.UnicodeString(if_missing=None, if_empty=None)
    
         config = variable_decode(kwargs)
         datastores = {}
    

    Then I changed the Ming config in production.ini like so:

    # Ming setup
    ming.main.master = mongodb://10.58.6.14:27017
    # (the name of my replica set is 'foo')
    ming.main.replicaSet = foo
    ming.main.read_preference = 1
    
    ming.project.master = mongodb://10.58.6.14:27017
    ming.project.replicaSet = foo
    ming.project.read_preference = 1
    

    With these changes in place, I got automatic failover when restarting nodes in the replica set. Now I'm wondering if this is all we need, instead of the new AutoRetryConnection.

    Thoughts?

     
  • Dave Brondsema

    Dave Brondsema - 2012-03-21

    Using a ReplicaSetConnection connection with "secondary" read preference would be good. My only concern with that is the pre-2.1.0 notice on http://www.mongodb.org/display/DOCS/Indexing+as+a+Background+Operation I suppose when secondaries are blocking, queries could still go to the primary, but we'd want to confirm.

     
  • Rick Copeland - 2012-03-22
    • status: in-progress --> invalid
     
  • Rick Copeland - 2012-03-22

    Marking invalid as per:

     [#3806] is proving hard to reliably reproduce — is it still happening in prod? is it still a priority?
    4:31
    sfbot-000 left the room (quit: Remote host closed the connection).
    4:31
    sfbot-000 [~sfbot@nat-default.ch3.sourceforge.com] entered the room.
    
    4:31
    rick446
    #3806 handle AutoReconnect to allura & gutenberg
    
    4:32
    brondsem
    it happened once or twice when we switched databases or had database issues
    so it's not still happening
    not currently at least
    i don't think we should spend a lot more time on it
    but if we can push something that makes the site more resilient to db changes, i'll be happy
    
    4:33
    rick446
    well, it's hard to say if this'll do what you want — the patch does retry under a certain set of circumstances
    4:34
    sfbot-000 left the room (quit: Remote host closed the connection).
    4:34
    sfbot-000 [~sfbot@nat-default.ch3.sourceforge.com] entered the room.
    
    4:34
    brondsem
    sfbot doesn't like unicode emdash
    
    4:34
    rick446
    and adium creates it with - -
    
    — —
    4:34
    sfbot-000 left the room (quit: Remote host closed the connection).
    4:34
    sfbot-000 [~sfbot@nat-default.ch3.sourceforge.com] entered the room.
    
    4:35
    rick446
    ok, now i guess I'm just being mean
    
    4:35
    brondsem
    yeah i turned it off in adium, since i'd often type it as --options for --commands
    anyway, do you think the retrying that it will do would be useful?
    and/or should we consider the replicaset / read_preference settings that Tim mentioned?
    
    4:36
    rick446
    well getting the error in the first place should be infrequet
    infrequent
    and it seems to fail over ok after it fails a couple times (when a new master is getting elected)
    
    4:37
    brondsem
    right - ok that sounds good
    a few failures is fine
    
    4:37
    rick446
    I think moving allura from strong consistency (which it has now) to eventual consistency (as it would if you had read_preference=SECONDARY) would be risky
    ok, I will mark this as invalid
    
    4:37
    brondsem
    oh yeah - forgot about that 
    
     

    Related

    Tickets: #3806


Log in to post a comment.