Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

CBSE-115 - bug in the very first multiget command

The 1.8.0 feature to enable event-based, asynchronous downstream
connect()'ing (instead of the old synchronous downstream
connect()'ing) apparently introduced a bug with multi-get.

When the first request is a multi-get command that actually has
multiple key parameters, that first request can sometimes fail,
because an asynchronously connect()'ing downstream conn is left
registered in libevent.  So, libevent might sometimes inadvertently
invoke the on_pause() callbacks which closes the downstream conns.

An existing unit tests for STATS (which also uses a broadcast codepath
like multiget) seems to sometimes catch this.

  ./t/issue-MB-3076.sh

After this fix of unregistering the half connected downstream conn
from libevent, test for MB-3076 passes.

Change-Id: Ia197a033fc7fece39055cf4bf3ea23c1e576ebc6
Reviewed-on: http://review.couchbase.org/14129
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>
  • Loading branch information...
commit 0ba14da7c715443d7ca3cb9fae4b10577a58742a 1 parent e50dd80
@steveyen steveyen authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  cproxy.c
View
1  cproxy.c
@@ -3163,6 +3163,7 @@ bool cproxy_on_connect_downstream_conn(conn *c) {
}
conn_set_state(c, conn_pause);
+ update_event(c, 0);
cproxy_forward_or_error(d);
return true;

0 comments on commit 0ba14da

Please sign in to comment.
Something went wrong with that request. Please try again.