[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17804463#comment-17804463 ] Stefan Miklosovic commented on CASSANDRA-18999: --- Yeah, baseline fails too. I think this was broken already. > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17804262#comment-17804262 ] Brandon Williams commented on CASSANDRA-18999: -- Here's a baseline for [4.0|https://app.circleci.com/pipelines/github/driftx/cassandra/1454/workflows/0357136e-cee3-42e4-900b-3347fc8d42d3] and [4.1|https://app.circleci.com/pipelines/github/driftx/cassandra/1453/workflows/dd1732df-271c-43bc-bc5f-8577c605c746]. > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17804252#comment-17804252 ] Stefan Miklosovic commented on CASSANDRA-18999: --- I would be also worth to run these tests _without_ this patch. If it fails there too, we know we are not the ones to blame. > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17804251#comment-17804251 ] Brandon Williams commented on CASSANDRA-18999: -- I started [4.0|https://app.circleci.com/pipelines/github/driftx/cassandra/1445/workflows/80335a29-b138-49d3-897a-363c5d558ab5] and [4.1|https://app.circleci.com/pipelines/github/driftx/cassandra/1444/workflows/3a517f8a-872b-4119-9dea-fef2fffd78db] upgrade tests again. > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17804166#comment-17804166 ] Stefan Miklosovic commented on CASSANDRA-18999: --- I am not sure what's the problem either. The same set of tests seem to fail on 4.0 and 4.1 so I do not think this is environmental. Maybe a rerun would confirm or reject this? > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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} 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17803676#comment-17803676 ] Paulo Motta commented on CASSANDRA-18999: - Thanks Brandon! Looks like {{test_read_from_bootstrapped_node}} already failed in [5.0-j17|https://app.circleci.com/pipelines/github/driftx/cassandra/1446/workflows/e0726e79-e517-4a82-828c-c7931fc9d99b] but this is being tracked in CASSANDRA-19097. I will check back when CI finishes and commit if it looks good. > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17803656#comment-17803656 ] Brandon Williams commented on CASSANDRA-18999: -- ||Branch||CI|| |[4.0|https://github.com/driftx/cassandra/tree/CASSANDRA-18999-4.0]|[upgrade tests|https://app.circleci.com/pipelines/github/driftx/cassandra/1445/workflows/d346af10-7b34-41a0-b2b7-c1c3290a6696]| |[4.1|https://github.com/driftx/cassandra/tree/CASSANDRA-18999-4.1]|[upgrade tests|https://app.circleci.com/pipelines/github/driftx/cassandra/1444/workflows/ddfe8a3c-4b36-4b9e-8f01-c85249fd8488]| |[5.0|https://github.com/driftx/cassandra/tree/CASSANDRA-18999-5.0]|[j11|https://app.circleci.com/pipelines/github/driftx/cassandra/1446/workflows/f198627c-310d-4c2d-ad2c-c18ac8a13ee7], [j17|https://app.circleci.com/pipelines/github/driftx/cassandra/1446/workflows/e0726e79-e517-4a82-828c-c7931fc9d99b]| > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17803651#comment-17803651 ] Paulo Motta commented on CASSANDRA-18999: - Please find updated patches prepared for commit: * [4.0-18999|https://github.com/pauloricardomg/cassandra/tree/4.0-18999] * [4.1-18999|https://github.com/pauloricardomg/cassandra/tree/4.1-18999] * [5.0-18999|https://github.com/pauloricardomg/cassandra/tree/5.0-18999] > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17801833#comment-17801833 ] Stefan Miklosovic commented on CASSANDRA-18999: --- I dont have such Circle plan. You need to ask somebody from Apple or DS. > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17801825#comment-17801825 ] Paulo Motta commented on CASSANDRA-18999: - {quote}I have tested 5.0 already, links are in my last comments above. Have you done some changes to it? I think 5.0 is fully covered, the only thing we need is upgrade dtests for 4.0 and 4.1. {quote} The 5.0 version you submitted was based on the [CASSANDRA-18999-5.0-hasMajVer3removal|https://github.com/apache/cassandra/compare/trunk...instaclustr:cassandra:CASSANDRA-18999-5.0-hasMajVer3removal] branch which removes {{hasMajorVersion3Nodes}} from 5.0. We need to submit CI for [this branch|https://github.com/pauloricardomg/cassandra/tree/cassandra-5.0] where {{hasMajorVersion3Nodes}} is fixed but not removed (the removal will be done on CASSANDRA-19243). We also need to submit upgrade tests for 4.0/4.1/5.0. Can you do this in circle? If not I guess we'll have to wait until asf ci is bac. > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17801762#comment-17801762 ] Stefan Miklosovic commented on CASSANDRA-18999: --- [~paulo] I have tested 5.0 already, links are in my last comments above. Have you done some changes to it? I think 5.0 is fully covered, the only thing we need is upgrade dtests for 4.0 and 4.1. > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17801031#comment-17801031 ] Paulo Motta commented on CASSANDRA-18999: - I created CASSANDRA-19243 to have a wider review on removal of pre-4.0 compatibility code. For this ticket, let's just merge the original 4.0/4.1/5.0 PRs fixing {{Gossiper::hasMajorVersion3Nodes}} without removing pre-4.0 compatibility code from 5.0: I have prepared the patches for commit: * [cassandra-4.0|https://github.com/pauloricardomg/cassandra/tree/cassandra-4.0] * [cassandra-4.1|https://github.com/pauloricardomg/cassandra/tree/cassandra-4.1] * [cassandra-5.0|https://github.com/pauloricardomg/cassandra/tree/cassandra-5.0] I've submitted a [devbranch job|https://ci-cassandra.apache.org/job/Cassandra-devbranch/2649/] for the cassandra-5.0 branch but it seems ci-cassandra.a.o is unavailable. I don't have circle environment setup, so I will wait until jenkins is back or someone submits a circle job for cassandra-5.0 before committing this. > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17799571#comment-17799571 ] Stefan Miklosovic commented on CASSANDRA-18999: --- We should double check there are not any leftovers in trunk. Otherwise I am OK to merge this. I think that we need upgrade dtests for 4.0 and 4.1 as well. > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17799340#comment-17799340 ] Stefan Miklosovic commented on CASSANDRA-18999: --- upgrade dtests look good too https://app.circleci.com/pipelines/github/jacek-lewandowski/cassandra/1238/workflows/0f5916b2-1e7d-4bd2-b96b-07288fdfa770/jobs/62154 [~paulo] so, what is the next step here? > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17798652#comment-17798652 ] Stefan Miklosovic commented on CASSANDRA-18999: --- Let's see what circle has to say https://app.circleci.com/pipelines/github/instaclustr/cassandra/3665/workflows/888e7558-49bf-434e-88b9-efdb26c00b8d > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17798643#comment-17798643 ] Isaac Reath commented on CASSANDRA-18999: - I closed the old 5.0 PR and created [https://github.com/apache/cassandra/pull/3004] which removes Gossiper::hasMajorVersion3Nodes and references. If there is any objection to doing this clean up we can always re-open the old 5.0 PR which fixes the bug. > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17798482#comment-17798482 ] Stefan Miklosovic commented on CASSANDRA-18999: --- [j11 4.0|https://app.circleci.com/pipelines/github/instaclustr/cassandra/3658/workflows/a7c5ab7a-67f4-4496-ba2a-44086743aa83] [j8 4.0|https://app.circleci.com/pipelines/github/instaclustr/cassandra/3658/workflows/29339649-fa96-43e9-908c-10101413d1b4] [j11 4.1|https://app.circleci.com/pipelines/github/instaclustr/cassandra/3659/workflows/0628f9f4-0546-4100-b2fc-3b1aed0a5380] [j8 4.1|https://app.circleci.com/pipelines/github/instaclustr/cassandra/3659/workflows/65b06220-fdf4-46ee-bcb3-7a1799746c1a] Builds look good on these branches. We just need to cover 5.0. > 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: 0.5h > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17798301#comment-17798301 ] Stefan Miklosovic commented on CASSANDRA-18999: --- Got it, yeah I think you nailed it. I needed to have it explicitly stated like this. In summary: 4.0/4.1 patches: LGTM 5.0 patch: only remove Gossiper::hasMajorVersion3Nodes and any references to it. Trunk (no change) This seems like good approach. > 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: 0.5h > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17798298#comment-17798298 ] Paulo Motta commented on CASSANDRA-18999: - {quote}I think we should keep some version of hasMajorVersion3Nodes still around, something like this: {quote} Where will this method be ever used if we're removing {{Gossiper::hasMajorVersion3Nodes}} and all references to it? There is no place in the code that requires checking if there are unknown nodes in gossip, except inside [upgradeFromVersionSupplier|https://github.com/apache/cassandra/blob/cassandra-5.0/src/java/org/apache/cassandra/gms/Gossiper.java#L219], where the check will be kept. {quote}I just dont understand that when the original version was dealing with unknown versions and it could evaluate that method as returning true, then us removing the unknown check will change behavior in 5.0 as well. {quote} As far as I understand the objective of hasMajorVersion3Nodes methods is to *not* do things when a cluster node is identified to be in version 3.x. It was not possible to know if a node with unknown version was on 3.x or not, so hasMajorVersion3Nodes returned true if a node version was not known (since it could potentially be a 3.x nodes). On 5.x we no longer need to identify if a node is on version 3.x since direct upgrade from 3.x is not supported, so there is no reason to keep hasMajorVersion3Nodes or hasUnknownNodes around. > 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: 0.5h > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17798296#comment-17798296 ] Stefan Miklosovic commented on CASSANDRA-18999: --- I think we should keep some version of hasMajorVersion3Nodes still around, something like this: {code:java} public boolean hasUnknownNodes() { return hasNodeWithUnknownVersion; }{code} I just dont understand that when the original version was dealing with unknown versions and it could evaluate that method as returning true, then us removing the unknown check will change behavior in 5.0 as well. > 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: 0.5h > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17798294#comment-17798294 ] Paulo Motta commented on CASSANDRA-18999: - {quote}So, if this is removed in 5.0, that also means that the places where that method is called are not relevant anymore - as you showed its usage in your first comment to this ticket. That means that we would need a little bit more refactoring in 5.0 around that. {quote} Yes, [~isaacreath] I think we need to update the 5.0 patch to remove {{Gossiper::hasMajorVersion3Nodes}} and any references to it. {quote}check this, that comment in particular (1). It seems to me that unknown version can happen in 4.0+ as well. {quote} We shouldn't remove this variable from {{upgradeFromVersionSupplier}} since it will still be needed there. We just don't need the method {{hasMajorVersion3OrUnknownNodes}} nor {{{}hasNodeWithUnknownVersion{}}}, since these will no longer be required anywhere in 5.x. For the 5.x patch after removing {{Gossiper::hasMajorVersion3Nodes}} we can keep the [upgradeFromVersionSupplier|https://github.com/apache/cassandra/blob/cassandra-5.0/src/java/org/apache/cassandra/gms/Gossiper.java#L219] in the original configuration, where {{allHostsHaveKnownVersion}} is a local variable within that method used [here|https://github.com/apache/cassandra/blob/cassandra-5.0/src/java/org/apache/cassandra/gms/Gossiper.java#L253]. In summary: - 4.0/4.1 patches: LGTM - 5.0 patch: only remove Gossiper::hasMajorVersion3Nodes and any references to it. - Trunk (no change) 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: 0.5h > 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:
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17798282#comment-17798282 ] Stefan Miklosovic commented on CASSANDRA-18999: --- check this, that comment in particular (1). It seems to me that unknown version can happen in 4.0+ as well. https://github.com/instaclustr/cassandra/blob/CASSANDRA-18999-5.0/src/java/org/apache/cassandra/gms/Gossiper.java#L244-L246 > 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: 0.5h > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17798280#comment-17798280 ] Stefan Miklosovic commented on CASSANDRA-18999: --- So, if this is removed in 5.0, that also means that the places where that method is called are not relevant anymore - as you showed its usage in your first comment to this ticket. That means that we would need a little bit more refactoring in 5.0 around that. > 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: 0.5h > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17798276#comment-17798276 ] Paulo Motta commented on CASSANDRA-18999: - Fwiw I'm +1 on the patch, but let's wait a bit to see if Mick/Brandon have any input. If you're good can you trigger ci [~smiklosovic] ? I need to setup my circleci stuff to be able to submit, will setup this soon. > 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: 0.5h > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17798274#comment-17798274 ] Paulo Motta commented on CASSANDRA-18999: - {quote}So I can see an argument for completely removing this in 5.0, but on the other hand, there is also this "or unknown nodes" and that is still valid question to ask. Hence, would not it be more appropriate to remove "isUpgradingFromVersionLowerThan" and base this method just on "hasNodeWithUnknownVersion" ? {quote} Upgrade from 3.x to 5.x is not supported, so this method should be removed. The unknown version check is a pessimistic guard against a 3.x node possibly not having its version propagated via gossip. Since upgrade from 3.x is no longer supported on 3.x, this should no longer be guarded against. > 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: 0.5h > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17798271#comment-17798271 ] Stefan Miklosovic commented on CASSANDRA-18999: --- I am not sure what to do about this in 5.0. It feels "wrong" to have a method there like this: {code:java} /** * Returns {@code false} only if the information about the version of each node in the cluster is available and * ALL the nodes are on 4.0+ (regardless of the patch version). */ public boolean hasMajorVersion3OrUnknownNodes() { return isUpgradingFromVersionLowerThan(CassandraVersion.CASSANDRA_4_0) || // this is quite obvious // however if we discovered only nodes at current version so far (in particular only this node), // but still there are nodes with unknown version, we also want to report that the cluster may have nodes at 3.x hasNodeWithUnknownVersion; } {code} Is not it impossible to have 3.x nodes from 5.0 perspective in one cluster? This is not supported, right? So I can see an argument for completely removing this in 5.0, but on the other hand, there is also this "or unknown nodes" and that is still valid question to ask. Hence, would not it be more appropriate to remove "isUpgradingFromVersionLowerThan" and base this method just on "hasNodeWithUnknownVersion" ? > 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: 0.5h > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17794303#comment-17794303 ] Isaac Reath commented on CASSANDRA-18999: - Looks like this function was removed on trunk in [https://github.com/apache/cassandra/commit/ae0842372ff6dd1437d026f82968a3749f555ff4#diff-99267a2170b04fd7dd24d6c6bf2ba1fc26d6dc896cd74f8c5bd56c476e2540e4L2458-L2464] as part of adding TCM. Since it's all removed there, I applied the same fix as 4.0 and 4.1 instead of removing the code entirely on the patch to 5.0. > 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: 0.5h > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17784416#comment-17784416 ] Michael Semb Wever commented on CASSANDRA-18999: Removing fixVersion 5.0-beta as I see nothing here that is critical and should block 5.0-beta1, and the patch for all the branches is best done in one go (even if >5 is removing the function). > 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-beta, 5.x > > > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17782779#comment-17782779 ] Paulo Motta commented on CASSANDRA-18999: - Also: c) [Skip removing|https://github.com/apache/cassandra/blob/e5d235dd4d385a324a3599c178118a2f32ec85d6/src/java/org/apache/cassandra/gms/Gossiper.java#L1727] legacy fields from gossip state once the cluster has upgraded (this would not be an issue since the fields would have been already removed in a minor 4.x upgrade) > 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 >Priority: Normal > > 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
[jira] [Commented] (CASSANDRA-18999) Gossiper::hasMajorVersion3Nodes returns true when a cluster is upgrading patch version without Cassandra 3 nodes.
[ https://issues.apache.org/jira/browse/CASSANDRA-18999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17782778#comment-17782778 ] Paulo Motta commented on CASSANDRA-18999: - Nice catch, thanks for the report! Based on the [usages of this function|https://github.com/search?q=repo%3Aapache%2Fcassandra%20hasMajorVersion3Nodes=code)] it looks like this issue could cause 2 side-effects during minor 4.x upgrades: a) [omit insertion|https://github.com/apache/cassandra/blob/e5d235dd4d385a324a3599c178118a2f32ec85d6/src/java/org/apache/cassandra/tracing/TraceKeyspace.java#L128] of trace columns {{source_port}} and {{cordinator_port}} b) [omit insertion|https://github.com/apache/cassandra/blob/e5d235dd4d385a324a3599c178118a2f32ec85d6/src/java/org/apache/cassandra/schema/SystemDistributedKeyspace.java#L233] of system_distributed.repair_history columns {{coordinator_port}} and {{participants_v2}} This looks like low severity but still important to fix to prevent these defects during minor upgrades. > 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 >Priority: Normal > > 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