client: make Redis::Client#ensure_connected handle fork reconnects#414
client: make Redis::Client#ensure_connected handle fork reconnects#414pietern merged 1 commit intoredis:masterfrom
Conversation
If reconnect is enabled and ensure_connected is called in the forked child of the process that established the connection, a reconnect attempt should be made; handle this case like any other ConnectionError.
|
+1 |
|
It looks like the build failure is unrelated, and only on |
|
Can I do anything to help this move forward? |
|
I was wondering if @pietern is not moving on this because of the work he is doing with the hiredis project. |
|
@Bertg This is compatible. The functionality in redis-rb is just a superset of the functionality in hiredis-rb. @yaauie Thanks for this patch. It's the most elegant one I've seen so far to address this problem. The test failure you have seen is a flaky one. The JRuby ones fail every now and then, usually related to I/O errors or timeouts. |
client: make Redis::Client#ensure_connected handle fork reconnects
|
+1 on the gem -- can we get a 3.0.8? |
|
If there's anything I can do to assist in getting this into a release (any other bugs that need squashing or features that need completion/verification), I'd be more than willing to lend help. |
|
Guys, we are in desperate need of a 3.0.8 release with this fix. How can we help? |
|
This feature was released in 3.1.0. |
See redis/redis-rb#414 This allows canvas to work cleanly with redis on newer passenger versions which explicitly establish an activerecord connection before calling starting_worker_process, since switchman also establishes a redis connection and thus would generate a bunch of noise from trying to reuse a forked redis connection. Change-Id: I228cc6717362693892c36ca6616ccba15aaff2fc Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/255631 Reviewed-by: Ethan Vizitei <evizitei@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> QA-Review: Jacob Burroughs <jburroughs@instructure.com> Product-Review: Jacob Burroughs <jburroughs@instructure.com>
If
@reconnectis enabled and#ensure_connectedis called in the forked child ofthe process that established the connection, a reconnect attempt should be made;
handle this case like any other
ConnectionError.