management-api-for-apache-cassandra
management-api-for-apache-cassandra copied to clipboard
K8SSAND-834 ⁃ Cassandra 4.1-SNAPSHOT fails to start
A recent PR for Medusa uncovered a non-backward compatible change in some internal Cassandra APIs that Management API uses.
Specifically, this change in the Dispatcher to the processRequest method breaks the call to that method in Management API here.
Either the 4.0 agent will have to handle this (maybe with some reflection tricks), or we may have to split out the 4.0 GA agent from the 4.1-SNAPSHOT agent. It will also be interesting to see if the Cassandra change makes it into a 4.0 patch release (and not just in 4.1), as that would mean a different agent for 4.0.0 GA vs 4.0.1.
┆Issue is synchronized with this Jira Bug by Unito ┆Fix Versions: management-api-for-apache-cassandra-0.1.29 ┆Issue Number: K8SSAND-834 ┆Priority: Medium
➤ Erik Merkle commented:
I have a “proof of concept” hack for this in https://github.com/k8ssandra/management-api-for-apache-cassandra/pull/123 ( https://github.com/k8ssandra/management-api-for-apache-cassandra/pull/123|smart-link ) I don’t like the solution as it catches a NoSuchMethodError in the case of Cassandra 4.1, and then tries Java reflection to find the 4.1 method. All of this is done because the code doesn’t pull in the appropriate 4.1 Cassandra jarfiles, because they aren’t publicly available yet.
I think the long term fix would be to create a new Maven submodule for a Cassandra 4.1 agent (like we already have for 3.11 and 4.0). The problem with this is we have to wait until at least a snapshot version of cassandra-all-4.1.0.jar is available to compile against.
However, until this is done, Medusa will continue to have the Management API tests fail when run against Cassandra trunk (example here: https://github.com/thelastpickle/cassandra-medusa/runs/3531636063?check_suite_focus=true ( https://github.com/thelastpickle/cassandra-medusa/runs/3531636063?check_suite_focus=true|smart-link ) ).
If snapshot jars can’t be made easily available, we could merge the hack PR above as a temporary fix, with the intent to fix it properly once 4.1 is available.