Send LS- without origin to route

When cluster origin code was added, a server may send LS+ with
an origin cluster name in the protocol. Parsing code from a ROUTER
connection was adjusted to understand this LS+ protocol.
However, the server was also sending an LS- with origin but the
parsing code was not able to understand that. When the unsub was
for a queue subscription, this would cause the parser to error out
and close the route connection.

This PR sends an LS- without the origin in this case (so that tracing
makes sense in term of LS+/LS- sent to a route). The receiving side
then traces appropriate LS- but processes as a normal RS-.

Resolves #1751

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
Ivan Kozlovic
2020-11-30 13:31:32 -07:00
parent ebe63db3e3
commit 77aead807c
3 changed files with 86 additions and 3 deletions

View File

@@ -733,7 +733,12 @@ func (c *client) parse(buf []byte) error {
err = c.processUnsub(arg)
case ROUTER:
if trace && c.srv != nil {
c.traceInOp("RS-", arg)
switch c.op {
case 'R', 'r':
c.traceInOp("RS-", arg)
case 'L', 'l':
c.traceInOp("LS-", arg)
}
}
err = c.processRemoteUnsub(arg)
case GATEWAY: