[
https://issues.apache.org/jira/browse/CASSANDRA-5692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13691630#comment-13691630
]
Cathy Daw commented on CASSANDRA-5692:
--------------------------------------
[~sbtourist]
i can apply patch 001 or 004 successfully, but not able to apply 001 + 004.
Do I need both?
{noformat}
# via git apply
$ git reset --hard HEAD
HEAD is now at 0f7c7dc Merge pull request #15 from riptano/CASSANDRA-5476
$ git apply --whitespace=fix 5692-0001.patch 5692-0004.patch
5692-0001.patch:37: trailing whitespace.
5692-0004.patch:89: trailing whitespace.
5692-0004.patch:133: trailing whitespace.
5692-0004.patch:138: trailing whitespace.
5692-0004.patch:143: trailing whitespace.
error: patch failed:
src/java/org/apache/cassandra/net/OutboundTcpConnection.java:278
error: src/java/org/apache/cassandra/net/OutboundTcpConnection.java: patch does
not apply
# via unix patch
$ git reset --hard HEAD
HEAD is now at 0f7c7dc Merge pull request #15 from riptano/CASSANDRA-5476
$ patch -l -p1 < 5692-0001.patch
patching file src/java/org/apache/cassandra/net/OutboundTcpConnection.java
$ patch -l -p1 < 5692-0004.patch
patching file src/java/org/apache/cassandra/net/MessagingService.java
patching file src/java/org/apache/cassandra/net/OutboundTcpConnection.java
Hunk #1 FAILED at 278.
1 out of 1 hunk FAILED -- saving rejects to file
src/java/org/apache/cassandra/net/OutboundTcpConnection.java.rej
$ cat src/java/org/apache/cassandra/net/OutboundTcpConnection.java.rej
***************
*** 278,284 ****
if (logger.isDebugEnabled())
logger.debug("attempting to connect to " +
poolReference.endPoint());
- targetVersion =
MessagingService.instance().getVersion(poolReference.endPoint());
long start = System.currentTimeMillis();
while (System.currentTimeMillis() < start +
DatabaseDescriptor.getRpcTimeout())
--- 278,284 ----
if (logger.isDebugEnabled())
logger.debug("attempting to connect to " +
poolReference.endPoint());
+ targetVersion =
MessagingService.instance().getVersion(poolReference.endPoint(), true);
long start = System.currentTimeMillis();
while (System.currentTimeMillis() < start +
DatabaseDescriptor.getRpcTimeout())
{noformat}
> Race condition in detecting version on a mixed 1.1/1.2 cluster
> --------------------------------------------------------------
>
> Key: CASSANDRA-5692
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5692
> Project: Cassandra
> Issue Type: Bug
> Affects Versions: 1.1.9, 1.2.5
> Reporter: Sergio Bossa
> Priority: Minor
> Attachments: 5692-0001.patch, 5692-0004.patch
>
>
> On a mixed 1.1 / 1.2 cluster, starting 1.2 nodes fires sometimes a race
> condition in version detection, where the 1.2 node wrongly detects version 6
> for a 1.1 node.
> It works as follows:
> 1) The just started 1.2 node quickly opens an OutboundTcpConnection toward a
> 1.1 node before receiving any messages from the latter.
> 2) Given the version is correctly detected only when the first message is
> received, the version is momentarily set at 6.
> 3) This opens an OutboundTcpConnection from 1.2 to 1.1 at version 6, which
> gets stuck in the connect() method.
> Later, the version is correctly fixed, but all outbound connections from 1.2
> to 1.1 are stuck at this point.
> Evidence from 1.2 logs:
> TRACE 13:48:31,133 Assuming current protocol version for /127.0.0.2
> DEBUG 13:48:37,837 Setting version 5 for /127.0.0.2
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira