-
Notifications
You must be signed in to change notification settings - Fork 170
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
SNOW-917458: Snowflake JDBC drivers fails on JDK 21 with Arrow serialization #1512
Comments
I ran into the same issue described by @wendigo. |
@wendigo Can you post the exception you are seeing? |
The relevant Arrow change is linked in the issue description. |
This is due to the change in the DirectByteBuffer constructor in JDK 21 (previously it was (long, int), now it is (long, long)): openjdk/jdk@a56598f |
I'm checking internally if we can backport the Arrow fix. |
Any updates here? I'm running into the exact same issue and it's currently the only item blocking our upgrade to JDK 21. |
@tpoll We're still looking into this, but I don't have yet any timelines. It might take some time since we have some other priorities as of now, but I'll get back with an update as soon as I have more specific information. |
@tpoll @wendigo would you be able to build PR #1529 and confirm that helps resolve your issue? I tested this locally and it works for me. It would be great if you could test it for your particular workload just to confirm everything else is functioning as expected since we're making a leap in the Arrow library release version from 10.0.0 to 13.0.0 to fix this. |
Sure @sfc-gh-wfateem ! I can confirm that in a couple of minutes |
@sfc-gh-wfateem thanks for the quick turn around. I just tested the PR against several of our workloads and confirmed the patch seems to resolve the issue. I didn't observe any other regression. |
@sfc-gh-wfateem @tpoll I'm on 50/284 tests, and so far, so good :) |
Why do you think that it will break 8 @sfc-gh-wfateem ? |
We had to upgrade Jackson to 2.15.1 and I saw that it introduced a multi-release JAR, which in return we're shading. I'm not sure if a JDK 8 runtime environment will understand what to do in that situation or not.
I'll need to look into it a bit more. |
I tested on JDK 17 and JDK 21 |
Seems like this one: netty/netty#12119 |
@wendigo yup. That looks like it. |
Homebrew/homebrew-core#106195 similiar one |
From my experience, I found the Temurin builds the most stable in comparison to OpenJDK/Zulu/Corretto |
@wendigo it looks like the issue is rectified on JDK 8 after I removed the following argument:
Still, we wouldn't be able to merge and release this without considering it a breaking change. We would need to discuss how to move forward with this. |
@sfc-gh-wfateem have you tried to use other vendor than OpenJDK? |
@wendigo No I haven't, but we have a lot of customers that use OpenJDK so we're looking at it from that perspective. It's irrelevant if it works on other distributions and it's not going to be feasible to test every vendor's JDK 8 distribution. |
I'm surprised that anyone is using, non-TCK attested distribution in production :) Brave! |
Any updates here? Some potential routes could be shading the fix into the old version of arrow or else trying to do a multi release jar. |
If the snowflake jar had a non-shaded distribution, users could upgrade dependencies by themselves... |
Or you could release per jdk driver using maven classifier like mssql does (https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc) |
@sfc-gh-wfateem is there a release date for this change? |
Hey @wendigo, |
@sfc-gh-wfateem new version was released today afaik |
@wendigo yes, it looks like 3.14.4 was released sooner than I anticipated. |
The root cause of the problem is the fact that snowflake jdbc driver is using Arrow version before 13.0.0 which includes a fix for the DirectByteBuffer constructor change, introduced in JDK 21: apache/arrow#36370
The solution is to either manually backport this change to a driver or upgrade Arrow to 13.0.0
Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!
Latest
Linux/MacOS, both arm and intel
JDK 21-ea (build 35)
Query snowflake using JDBC driver. It fails when Arrow serialization is used.
Working driver
Can you set logging to DEBUG and collect the logs?
https://community.snowflake.com/s/article/How-to-generate-log-file-on-Snowflake-connectors
What is your Snowflake account identifier, if any? (Optional)
The text was updated successfully, but these errors were encountered: