History log of /6.0.3/moxi/src/cproxy.c (Results 1 - 25 of 481)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v5.0.0
# f6b2f64b 10-May-2017 Trond Norbye <trond.norbye@gmail.com>

CBSE-3717: __LINE__ should be formatted with %d

The preprocessor macro __LINE__ is a number and not a textual
string. It would cause the printf to access invalid memory.

Change-

CBSE-3717: __LINE__ should be formatted with %d

The preprocessor macro __LINE__ is a number and not a textual
string. It would cause the printf to access invalid memory.

Change-Id: I8a85b567e54a71bffec486dc62cff56ebd67811b
Reviewed-on: http://review.couchbase.org/77933
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


# d5d2c97b 10-May-2017 Trond Norbye <trond.norbye@gmail.com>

CBSE-3717: Disable assertions for dropping connections with rbytes>0

Disabling the assertion allows the connection to be closed and
server to continue to operate.

It does howeve

CBSE-3717: Disable assertions for dropping connections with rbytes>0

Disabling the assertion allows the connection to be closed and
server to continue to operate.

It does however _NOT_ solve the reason _why_ the connection
isn't found in the list (The logging added in the previous
patch may sched some light on that)

Change-Id: Ie8ea56d2390a49ec674d7d03d58b910ca728f64c
Reviewed-on: http://review.couchbase.org/77931
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>

show more ...


Revision tags: v4.6.0, v4.5.0, v4.0.0, v3.1.0
# c9de98e2 09-Apr-2015 Trond Norbye <trond.norbye@gmail.com>

MB-14288: Don't crash for closed

If we try to "force close" a connection we might
end up trying to call "close" on it twice which
cause one of the assertions to trigger. Just bail

MB-14288: Don't crash for closed

If we try to "force close" a connection we might
end up trying to call "close" on it twice which
cause one of the assertions to trigger. Just bail
out the second time

Change-Id: Id779b5bc539441ca1862e1e5e6bbdbf1f4ec4d6f
Reviewed-on: http://review.couchbase.org/49436
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


# d0366df5 09-Apr-2015 Trond Norbye <trond.norbye@gmail.com>

Use cb_assert instead of assert

Change-Id: If6b3170af815c324b26ff44bea3b950deed774fd
Reviewed-on: http://review.couchbase.org/49431
Tested-by: buildbot <build@couchbase.com>
Revi

Use cb_assert instead of assert

Change-Id: If6b3170af815c324b26ff44bea3b950deed774fd
Reviewed-on: http://review.couchbase.org/49431
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Steve Yen <steve.yen@gmail.com>

show more ...


Revision tags: v3.0.2, v3.0.1
# be051586 28-Aug-2014 Sriram Ganesan <sriram@couchbase.com>

MB-11804: Handle errors during connect in windows

Handle WSAEINPROGRESS and WSAEWOULDBLOCK errors while connecting
to a downstream connection

Change-Id: Ie573a67a937ce2c7c3c2724

MB-11804: Handle errors during connect in windows

Handle WSAEINPROGRESS and WSAEWOULDBLOCK errors while connecting
to a downstream connection

Change-Id: Ie573a67a937ce2c7c3c27243ebabd721691c51fe
Reviewed-on: http://review.couchbase.org/41065
Tested-by: Sriram Ganesan <sriram@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


Revision tags: v3.0.0
# e3ff3a18 01-Apr-2014 Trond Norbye <trond.norbye@gmail.com>

Make config.h more explicit by including as src/config.h

Change-Id: I8f0b2d13a0683b43df21653f6b91d547322e3d93
Reviewed-on: http://review.couchbase.org/35161
Reviewed-by: Trond Norbye

Make config.h more explicit by including as src/config.h

Change-Id: I8f0b2d13a0683b43df21653f6b91d547322e3d93
Reviewed-on: http://review.couchbase.org/35161
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


# 5affe2d0 18-Mar-2014 Trond Norbye <trond.norbye@gmail.com>

Refactor: Prepare source to be squashed

Change-Id: I275dc53298b8cd14df84cb528decfe08be32f68e
Reviewed-on: http://review.couchbase.org/34635
Reviewed-by: Trond Norbye <trond.norbye@gm

Refactor: Prepare source to be squashed

Change-Id: I275dc53298b8cd14df84cb528decfe08be32f68e
Reviewed-on: http://review.couchbase.org/34635
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


# c2d0114b 15-Jan-2014 Trond Norbye <trond.norbye@gmail.com>

Compile fixes for win32

Change-Id: I5dd91efa3089b1a312f96141459ad593726a66ef
Reviewed-on: http://review.couchbase.org/32428
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by

Compile fixes for win32

Change-Id: I5dd91efa3089b1a312f96141459ad593726a66ef
Reviewed-on: http://review.couchbase.org/32428
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


# ed741b63 15-Jan-2014 Trond Norbye <trond.norbye@gmail.com>

Cleanup from int to SOCKET

Change-Id: I43e3cc18c2a0c15845296ebfa82c9707482f9f96
Reviewed-on: http://review.couchbase.org/32423
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested

Cleanup from int to SOCKET

Change-Id: I43e3cc18c2a0c15845296ebfa82c9707482f9f96
Reviewed-on: http://review.couchbase.org/32423
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


# 7d4ff237 15-Jan-2014 Trond Norbye <trond.norbye@gmail.com>

Use libplatform instead of pthread

Change-Id: Id366ec26ddd2e68022e70cb6fd84a00a21a04313
Reviewed-on: http://review.couchbase.org/32422
Reviewed-by: Steve Yen <steve.yen@gmail.com>

Use libplatform instead of pthread

Change-Id: Id366ec26ddd2e68022e70cb6fd84a00a21a04313
Reviewed-on: http://review.couchbase.org/32422
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


# d824ea68 02-Jan-2014 Trond Norbye <trond.norbye@gmail.com>

Move towards C89

Change-Id: I9953891a2fa858b0a957faaa5974fbe2b7ba3ac5
Reviewed-on: http://review.couchbase.org/31537
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by:

Move towards C89

Change-Id: I9953891a2fa858b0a957faaa5974fbe2b7ba3ac5
Reviewed-on: http://review.couchbase.org/31537
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


# 3e2892e1 01-Jan-2014 Trond Norbye <trond.norbye@gmail.com>

Fix potential buffer overrun

Change-Id: Ic0914d025e8dc2e880dc7cf6b90a3e5c99a7ad0c
Reviewed-on: http://review.couchbase.org/31524
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>

Fix potential buffer overrun

Change-Id: Ic0914d025e8dc2e880dc7cf6b90a3e5c99a7ad0c
Reviewed-on: http://review.couchbase.org/31524
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


# dc2bf3a7 01-Jan-2014 Trond Norbye <trond.norbye@gmail.com>

Remove unused variable

Change-Id: Ia7661832c369417101a82fda66f4f202161093f3
Reviewed-on: http://review.couchbase.org/31523
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Test

Remove unused variable

Change-Id: Ia7661832c369417101a82fda66f4f202161093f3
Reviewed-on: http://review.couchbase.org/31523
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


Revision tags: 2.5.0
# db427f17 14-Nov-2013 Trond Norbye <trond.norbye@gmail.com>

Use C-stype comments

Change-Id: Ib374e49763843988b26f726220b66372c84828f5
Reviewed-on: http://review.couchbase.org/30327
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested

Use C-stype comments

Change-Id: Ib374e49763843988b26f726220b66372c84828f5
Reviewed-on: http://review.couchbase.org/30327
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>

show more ...


Revision tags: 2.1.1r, 2.0.1-linux, 1.8.1
# cb602b1f 26-Apr-2012 Steve Yen <steve.yen@gmail.com>

MB-4334 - clear downstream timeout before releasing

There's one code path in cproxy_release_downstream() where a
cproxy_forward() fails, during a retry, possibly while the downstream

MB-4334 - clear downstream timeout before releasing

There's one code path in cproxy_release_downstream() where a
cproxy_forward() fails, during a retry, possibly while the downstream
timeout_tv event is still regsitered. In that case, a downstream
could be released that has a non-0 timeout_tv. It's a small window
that some users have hit.

Change-Id: I1b87298dba1151c8ece51c0cd78d68ca6fa2bdb0
Reviewed-on: http://review.couchbase.org/15232
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>

show more ...


# 08dc908d 30-Mar-2012 Steve Yen <steve.yen@gmail.com>

CBSE-126 - clear links & timeouts before and after releasing conn

THe new zstored / asynchronous connect()'ing feature introduced
code that didn't cleanup correctly in two places.

CBSE-126 - clear links & timeouts before and after releasing conn

THe new zstored / asynchronous connect()'ing feature introduced
code that didn't cleanup correctly in two places.

First, when a downstream was released (cproxy_release_downstream()),
the downstream should be de-linked before looping through
downstream_conns and repeatedly invoking
zstored_release_downstream_conn(). The reason is that
zstored_release_downstream_conn() calls cproxy_forward(), which might
recurse.

Secondly, when a downstream conn is zstored_release()'ed, the next
chosen waiting downstream needs to have its timeout cleared.
Otherwise, the (incorrectly) still-registered timeout "might" fire in
unexpected places, possibly leading to bug CBSE-126 situation,
although it's not a proven linkage.

Change-Id: Ib3fb8365a606a9a8260ac59a4e2d1dba00851d24
Reviewed-on: http://review.couchbase.org/14423
Reviewed-by: Bin Cui <bin.cui@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>

show more ...


# 0ba14da7 20-Mar-2012 Steve Yen <steve.yen@gmail.com>

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()'

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>

show more ...


# e50dd801 15-Mar-2012 Steve Yen <steve.yen@gmail.com>

MB-4896 - Fix memory leak during dynamic reconfiguration.

The downstream data structs in moxi didn't have their
behavior data structures cleaned up.

Change-Id: Id96740f47f508b19

MB-4896 - Fix memory leak during dynamic reconfiguration.

The downstream data structs in moxi didn't have their
behavior data structures cleaned up.

Change-Id: Id96740f47f508b194e45990a1b580cbbfaabbefd
Reviewed-on: http://review.couchbase.org/13939
Reviewed-by: Bin Cui <bin.cui@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>

show more ...


Revision tags: 1.8.0
# 0f3a435f 10-Oct-2011 Steve Yen <steve.yen@gmail.com>

cproxy_forward assert(d->upstream_conn != NULL) cproxy.c, 1925

Here's the (rather involved) scenario where the assert would be triggered...

* start a rebalance. The rebalance shoul

cproxy_forward assert(d->upstream_conn != NULL) cproxy.c, 1925

Here's the (rather involved) scenario where the assert would be triggered...

* start a rebalance. The rebalance should be slow, where each vbucket
migration takes awhile.

* a multi-get command (with lots of keys) is processed by moxi, and
moxi scatters out downstream GET requests to the involved nodes.

* one downstream request will result in a NOT_MY_VBUCKET response from
a node, which will make moxi register for a retry of the command
again later (XXX).

* a different downstream request hits a pending vbucket, meaning it's
going to block moxi on that request, so moxi can't make progress on
that multi-get command.

* the rebalance is going very slowly, so next...

* moxi's downstream_timeout timer gets fired, so...

* moxi sends an error back up to the upstream client.

* THEN, since a retry was registered at step XXX above due to the
NOT_MY_VBUCKET, moxi next incorrectly goes through retry codepaths
and the assert() catches this bad move.

Change-Id: I4aea4e130ad55bbd2400bbbcd0547a86bddbc5da
Reviewed-on: http://review.couchbase.org/10039
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>

show more ...


# a17b4248 22-Sep-2011 nimish gupta <nigupta@zynga.com>

Moxi change for enabling event on downstream connection in pause state

when we put the downstream connection in conn_pause state, we disable the
events on that. So if the connection get

Moxi change for enabling event on downstream connection in pause state

when we put the downstream connection in conn_pause state, we disable the
events on that. So if the connection get closed, we know only when we linked
that connection to upstream connection ,forward the upstream command to that
connection and wait for read event on that.When we wait for read event,
we come to know that connection has closed.
This fix is to enable read event on the downstream connection in pause state,
so we will know if server send extra data for a command or closes the connection.

Change-Id: Iff50b252a04a8036bb901849953eac557ef8cf9d
Reviewed-on: http://review.couchbase.org/9717
Tested-by: Steve Yen <steve.yen@gmail.com>
Reviewed-by: Steve Yen <steve.yen@gmail.com>

show more ...


Revision tags: 1.7.2
# a6fae63a 13-Sep-2011 nimish gupta <nigupta@zynga.com>

Moxi in compatibility mode crashed after downstream timeout

when there is not free downstream connection, downstream is put into the downstream
queue, and if the downstream conn queue ti

Moxi in compatibility mode crashed after downstream timeout

when there is not free downstream connection, downstream is put into the downstream
queue, and if the downstream conn queue timeout happens, we try to remove it from the
downstream queue but it is not removed from the queue since the host identifier is different
during insert and remove in the downstream queue and if the downstream connection is
closed, we try to send error to all downstream waiting.Then we try to send error to
released downstream which don't have upstream and moxi crashed.

Change-Id: I789618a617878e04bd65449cad5dff9f78a256c2
Reviewed-on: http://review.couchbase.org/9547
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>

show more ...


# c0e094a5 13-Sep-2011 nimish gupta <nigupta@zynga.com>

Moxi in mcmux mode give error if default(or behaviour) downstream protocol is ascii

when moxi running in mcmux mode, if client want to use binary protocol between
moxi and membase, it wi

Moxi in mcmux mode give error if default(or behaviour) downstream protocol is ascii

when moxi running in mcmux mode, if client want to use binary protocol between
moxi and membase, it will send B:host:port <command>, so the peer_protocol of
upstream connection will be binary but we will send still in ascii to membase since
default behaviour is ascii. When we get response from membase, we check that that
upstream connection's peer protocol is binary, so try to parse ascii response with
binary handler and it fails.

Change-Id: I26f097bc7d20a0e11c76560c8be54a9dda6b05b1
Reviewed-on: http://review.couchbase.org/9554
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>

show more ...


Revision tags: 1.7.1
# 6a26e91a 06-Jul-2011 Steve Yen <steve.yen@gmail.com>

MB-2897 - use 64-bits for msec_current time

32-bits overlows after 49+ days, and 64-bits should be enough for
anybody.

Change-Id: I769839ee4cb41f10ce808cf7f669c0cd1beb7245
R

MB-2897 - use 64-bits for msec_current time

32-bits overlows after 49+ days, and 64-bits should be enough for
anybody.

Change-Id: I769839ee4cb41f10ce808cf7f669c0cd1beb7245
Reviewed-on: http://review.couchbase.org/7748
Reviewed-by: Bin Cui <bin.cui@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>

show more ...


Revision tags: 1.7.0
# 36fe280e 17-May-2011 Steve Yen <steve.yen@gmail.com>

MB-3856 - SERVER_ERROR proxy downstream timeout $HOST

The $HOST is only appended during timeout of single-server commands
(get, set, delete, etc) which are the single-key commands. Broa

MB-3856 - SERVER_ERROR proxy downstream timeout $HOST

The $HOST is only appended during timeout of single-server commands
(get, set, delete, etc) which are the single-key commands. Broadcast
commands (like flush_all) won't have the $HOST appended during a
timeout.

Change-Id: I40c307a2ea4974aca6b884054da1f935ea8216a4
Reviewed-on: http://review.membase.org/6315
Reviewed-by: Bin Cui <bin.cui@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>

show more ...


# 0745b38d 16-May-2011 Steve Yen <steve.yen@gmail.com>

MB-3849 - SERVER_ERROR proxy write to downstream $HOST

Changed the error message to include the downstream host which moxi
could not propagate the request to.

Change-Id: Ia3e0bb

MB-3849 - SERVER_ERROR proxy write to downstream $HOST

Changed the error message to include the downstream host which moxi
could not propagate the request to.

Change-Id: Ia3e0bbc7ccf2f2ae203aaff56b60f571a1036b75
Reviewed-on: http://review.membase.org/6269
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>

show more ...


12345678910>>...20