Browse files

bug 1825 - binary FLUSHQ needs conn_closing

While bouncing client connections during binary-to-binary FLUSHQ, we
avoid cproxy_close_conn() (which was meant to close conn_pause'd
connections) and just use a straight conn_set_state(c, conn_closing).
This matches more closely how the memcached networking machinery
closes upstream connections and avoids a drive_machine() recursion,
too.

Change-Id: I962acd2d1b9eed4601b3bc1dbe7e8a88158d04c8
Reviewed-on: http://review.northscale.com/1262
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
  • Loading branch information...
1 parent d96c288 commit 62dcda0a029c32fb569ba9331070eb042cd5041a @steveyen steveyen committed with alk Jul 19, 2010
Showing with 7 additions and 1 deletion.
  1. +7 −1 cproxy_protocol_b.c
View
8 cproxy_protocol_b.c
@@ -131,7 +131,13 @@ void cproxy_process_upstream_binary_nread(conn *c) {
// into a wonky state, prevent it.
//
if (header->request.opcode == PROTOCOL_BINARY_CMD_FLUSHQ) {
- cproxy_close_conn(c);
+ // Note: don't use cproxy_close_conn(c), as it goes
+ // through the drive_machine() loop again.
+ //
+ // cproxy_close_conn(c);
+
+ conn_set_state(c, conn_closing);
+
return;
}

0 comments on commit 62dcda0

Please sign in to comment.