snowflakedb / snowflake-jdbc

Snowflake JDBC Driver
Apache License 2.0
178 stars 169 forks source link

SNOW-1787996: Unwanted INFO messages from arrow memory allocation manager [bis] #1956

Open cnotin opened 2 weeks ago

cnotin commented 2 weeks ago
  1. What version of JDBC driver are you using? 3.20.0

  2. What operating system and processor architecture are you using? Windows 11, x64

  3. What version of Java are you using? 11

  4. What did you do?

Upgraded a Kotlin program from JDBC driver version 3.14.2 to 3.20.0

  1. What did you expect to see?

No superfluous log messages Instead, I have this:

nov. 05, 2024 12:17:20 PM net.snowflake.client.jdbc.internal.apache.arrow.memory.BaseAllocator <clinit>
INFO: Debug mode disabled. Enable with the VM option -Darrow.memory.debug.allocator=true.
nov. 05, 2024 12:17:20 PM net.snowflake.client.jdbc.internal.apache.arrow.memory.DefaultAllocationManagerOption getDefaultAllocationManagerFactory
INFO: allocation manager type not specified, using netty as the default type
nov. 05, 2024 12:17:20 PM net.snowflake.client.jdbc.internal.apache.arrow.memory.CheckAllocator reportResult
INFO: Using DefaultAllocationManager at memory/unsafe/DefaultAllocationManagerFactory.class

Even though I'm using SLF4J with this JVM arg:

-Dnet.snowflake.jdbc.loggerImpl=net.snowflake.client.log.SLF4JLogger

which is working properly because I have this logger config in logback.xml which has visible effects, except on these arrow messages

<logger name="net.snowflake" level="WARN"/>

Also, I noticed that the arrow messages are printed to stderr, instead of stdout for other messages. It looks like they don't go through SLF4J.

Is there a regression perhaps? Seems very similar to: https://github.com/snowflakedb/snowflake-jdbc/issues/1095

  1. Can you set logging to DEBUG and collect the logs?

Not relevant I think

cnotin commented 2 weeks ago

Initially I found the issue when upgrading to 3.19.0. Then I noticed this fix in 3.19.1 https://docs.snowflake.com/en/release-notes/clients-drivers/jdbc-2024#id2

Fixed issues with Arrow logging.

So I upgraded to 3.20.0 instead and I still have the issue: image

I suppose this is the fix in 3.19.1: https://github.com/snowflakedb/snowflake-jdbc/pull/1922/files but should it fix it? Or on the contrary seems it mentions the usage of "customer logger instead of slf4j logger"?

sfc-gh-dszmolka commented 1 week ago

hi - thanks for reporting this, the team will take a look.

sfc-gh-dszmolka commented 4 days ago

addressed in https://github.com/snowflakedb/snowflake-jdbc/pull/1966

cnotin commented 4 days ago

Yeaaah! Thank you :) I'll test it and let you know once it's released

sfc-gh-dszmolka commented 3 days ago

PR is merged now and will be part of the next upcoming driver release, probably towards the end of the month

cnotin commented 3 days ago

Good news, thank you!