-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kong 0.12.2 and 0.13.0 fails against DSE 6.0 #3410
Comments
Hi, Officially, Kong is not compatible with Cassandra 4.x (it isn't even tested against it). Because of this, the code did not want to make assumptions as to how 4.x will behave/is behaving (there was no guarantee that 4.x would preserve the 3.x schema). I am not sure what the release schedule of 4.x looks like right now, but once we get a chance to investigate it, we'll make the necessary changes for compatibility with it (although we do have quite a lot on our hands right now already, so help would be welcome).
What is your suggestion? |
Hi. Thanks for replying. Regarding a possible longer term solution, we might consider abstracting the Cassandra |
I'm more than happy to contribute time for Cassandra 4.x support. If folks are supportive then I'd like to bracket the solution into a tactical fix for the current blocking issue and then look to spend time on a more considered solution. |
I am willing to incorporate such a hotfix in the 0.13.1 release which is being prepared right now, if you are willing to contribute it in the next few hours. You can send such a patch against the |
Thank you. I will work on this now. |
@thibaultcha Do you want me to send the patch to you? I've read the contribution guidelines and am available to submit a PR as it seems that's the preferred manner based on what I have read in the Submitting a Patch section. Regardless, I've attached the patch here in case you'd like to review. If you do prefer the patch then here's my commit message:
Otherwise, I believe I'll need write access to the Kong repository in order to push my branch for PR submission. Please let me know your preference. |
The typical GitHub process is for you to fork this repository, and then open a Pull Request from your fork's branch to this remote's master branch. |
I’ll take care of this now. |
@mprimeaux No worries, I will apply the patch you provided above. |
Thanks much. |
Patched applied to master, thanks! |
@thibaultcha I’ll now turn my attention to a more considered approach. |
Summary
kong migrations up --vv
fails to complete against Cassandra 4.x (DataStax DSE 6.0).Steps To Reproduce
sudo kong migrations up --vv
Additional Details & Logs
The output from bullet 4 follows.
Issue Details
The logic problem in line 700 of /kong/dao/db/cassandra.lua is the code accounts for the release version being 3.x and 2.x but unfortunately assumes that if the version is not 3.x then treat it as Cassandra 2.x, which fails since the DSE 6.0 version is now Cassandra 4.x.
Here is the DSE 6.0 cqlsh output.
The tactical fix is to change line 700 of /kong/dao/db/cassandra.lua from
if self.major_version_n == 3 then
toif self.major_version_n >= 3 then
. This change allows migrations to work as expected.Longer term, we should consider a more resilient approach.
The text was updated successfully, but these errors were encountered: