[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17804104#comment-17804104 ]
Paulo Motta commented on CASSANDRA-18999: ----------------------------------------- 5.0 precommit tests are looking good. I can't make a lot of sense from the [upgrade dtests failures|https://app.circleci.com/pipelines/github/driftx/cassandra/1444/workflows/ddfe8a3c-4b36-4b9e-8f01-c85249fd8488/jobs/70142/tests] but they don't seem related to this ticket. It looks like in both runs tests from {{upgrade_through_versions_test}} failed with: {noformat} <class 'ccmlib.node.NodeError'> Problem starting node node1 due to [Errno 2] No such file or directory: '/tmp/dtest-jbrcckw7/test/node1/cassandra.pid' {noformat} This looks like an environmental issue to me as I didn't find any open ticket for this particular issue. While the [4.1|https://app.circleci.com/pipelines/github/driftx/cassandra/1444/workflows/ddfe8a3c-4b36-4b9e-8f01-c85249fd8488] job completed the [4.0|https://app.circleci.com/pipelines/github/driftx/cassandra/1445/workflows/d346af10-7b34-41a0-b2b7-c1c3290a6696] seems to have gotten stuck. I'm inclined to commit this to avoid dragging this ticket longer and re-run the upgrade dtest before the next 4.X release to catch any outstanding upgrade issues. WDYT? > Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading > patch version without Cassandra 3 nodes. > ----------------------------------------------------------------------------------------------------------------- > > Key: CASSANDRA-18999 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18999 > Project: Cassandra > Issue Type: Bug > Components: Legacy/Distributed Metadata > Reporter: Isaac Reath > Assignee: Isaac Reath > Priority: Low > Labels: lhf > Fix For: 4.0.x, 4.1.x, 5.0.x > > Time Spent: 50m > Remaining Estimate: 0h > > When working on https://issues.apache.org/jira/browse/CASSANDRA-18968 we > found that {{Gossiper::hasMajorVersion3Nodes}} will return true when the > cluster is undergoing an upgrade from a patch version even if the cluster has > no Cassandra 3 nodes in it. > This can be reproduced by running this Gossiper test: > {code:java} > @Test > public void > testHasVersion3NodesShouldReturnFalseWhenNoVersion3NodesDetectedAndCassandra4UpgradeInProgress() > throws Exception > { > Gossiper.instance.start(0); > Gossiper.instance.expireUpgradeFromVersion(); > VersionedValue.VersionedValueFactory factory = new > VersionedValue.VersionedValueFactory(null); > EndpointState es = new EndpointState((HeartBeatState) null); > es.addApplicationState(ApplicationState.RELEASE_VERSION, > factory.releaseVersion(CURRENT_VERSION.toString())); > > Gossiper.instance.endpointStateMap.put(InetAddressAndPort.getByName("127.0.0.1"), > es); > > Gossiper.instance.liveEndpoints.add(InetAddressAndPort.getByName("127.0.0.1")); > es = new EndpointState((HeartBeatState) null); > String previousPatchVersion = String.valueOf(CURRENT_VERSION.major) + > '.' + (CURRENT_VERSION.minor) + '.' + (CURRENT_VERSION.patch - 1); > es.addApplicationState(ApplicationState.RELEASE_VERSION, > factory.releaseVersion(previousPatchVersion)); > > Gossiper.instance.endpointStateMap.put(InetAddressAndPort.getByName("127.0.0.2"), > es); > > Gossiper.instance.liveEndpoints.add(InetAddressAndPort.getByName("127.0.0.2")); > assertFalse(Gossiper.instance.hasMajorVersion3Nodes()); > } > {code} > This seems to be because of > [https://github.com/apache/cassandra/blob/cassandra-4.1/src/java/org/apache/cassandra/gms/Gossiper.java#L2360], > where an upgrade in progress is possible but we are not upgrading from a > lower family version (i.e from 4.1.1 to 4.1.2). > From the comment in this function, it seems instead of the existing check, we > would want to iterate over all known endpoints in gossip and return true if > any of them do not have a version (similar to > [https://github.com/apache/cassandra/blob/cassandra-4.1/src/java/org/apache/cassandra/gms/Gossiper.java#L227-L236) > > |https://github.com/apache/cassandra/blob/cassandra-4.1/src/java/org/apache/cassandra/gms/Gossiper.java#L227-L236).] -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org