doris icon indicating copy to clipboard operation
doris copied to clipboard

[improvement](jdbc catalog) Add catalog property to enable jdbc connection pool

Open zy-kkk opened this issue 1 year ago • 9 comments

We initially introduced jdbc connection pool to improve the connection performance of jdbc catalog, but we always found that connection pool would bring some unexpected errors, so we chose to add a catalog property: enable_connection_pool to choose whether to enable the jdbc connection pool of jdbc catalog, and the default is still true.

And we conducted performance tests on this, the performance loss is within the expected range.

  • Enable connection pool: mysqlslap -uroot -h127.0.0.1 -P9030 --concurrency=1 --iterations=100 --query='SELECT * FROM mysql.test.test limit 1;' --create-schema=mysql --delimiter=";" --verbose Benchmark Average number of seconds to run all queries: 0.008 seconds Minimum number of seconds to run all queries: 0.004 seconds Maximum number of seconds to run all queries: 0.133 seconds Number of clients running queries: 1 Average number of queries per client: 1

  • Disable connection pool: mysqlslap -uroot -h127.0.0.1 -P9030 --concurrency=1 --iterations=100 --query='SELECT * FROM mysql_no_pool.test.test limit 1;' --create-schema=mysql --delimiter=";" --verbose Benchmark Average number of seconds to run all queries: 0.054 seconds Minimum number of seconds to run all queries: 0.047 seconds Maximum number of seconds to run all queries: 0.184 seconds Number of clients running queries: 1 Average number of queries per client: 1

zy-kkk avatar Oct 16 '24 15:10 zy-kkk

Thank you for your contribution to Apache Doris. Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website. See Doris Document.

doris-robot avatar Oct 16 '24 15:10 doris-robot

run buildall

zy-kkk avatar Oct 16 '24 15:10 zy-kkk

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] avatar Oct 16 '24 15:10 github-actions[bot]

TeamCity be ut coverage result: Function Coverage: 37.47% (9711/25920) Line Coverage: 28.72% (80599/280618) Region Coverage: 28.17% (41709/148086) Branch Coverage: 24.75% (21208/85698) Coverage Report: http://coverage.selectdb-in.cc/coverage/9f96192d4b60b2836fc573b80c05cac5847f7e94_9f96192d4b60b2836fc573b80c05cac5847f7e94/report/index.html

doris-robot avatar Oct 16 '24 17:10 doris-robot

run buildall

zy-kkk avatar Oct 17 '24 02:10 zy-kkk

TeamCity be ut coverage result: Function Coverage: 37.46% (9709/25920) Line Coverage: 28.72% (80584/280618) Region Coverage: 28.17% (41709/148086) Branch Coverage: 24.74% (21204/85698) Coverage Report: http://coverage.selectdb-in.cc/coverage/9f96192d4b60b2836fc573b80c05cac5847f7e94_9f96192d4b60b2836fc573b80c05cac5847f7e94/report/index.html

doris-robot avatar Oct 17 '24 03:10 doris-robot

run buildall

zy-kkk avatar Oct 18 '24 09:10 zy-kkk

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] avatar Oct 18 '24 09:10 github-actions[bot]

TeamCity be ut coverage result: Function Coverage: 37.47% (9710/25917) Line Coverage: 28.75% (80654/280580) Region Coverage: 28.18% (41731/148076) Branch Coverage: 24.76% (21216/85688) Coverage Report: http://coverage.selectdb-in.cc/coverage/83d27729b6fd4cdeb54e35d8f1c335698483306a_83d27729b6fd4cdeb54e35d8f1c335698483306a/report/index.html

doris-robot avatar Oct 18 '24 10:10 doris-robot

run buildall

zy-kkk avatar Oct 21 '24 11:10 zy-kkk

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] avatar Oct 21 '24 11:10 github-actions[bot]

TeamCity be ut coverage result: Function Coverage: 37.46% (9699/25892) Line Coverage: 28.71% (80521/280477) Region Coverage: 28.14% (41649/147991) Branch Coverage: 24.71% (21164/85638) Coverage Report: http://coverage.selectdb-in.cc/coverage/45ac24efffc30712c6f89ddfa1f51363d92fe750_45ac24efffc30712c6f89ddfa1f51363d92fe750/report/index.html

doris-robot avatar Oct 21 '24 13:10 doris-robot

PR approved by at least one committer and no changes requested.

github-actions[bot] avatar Oct 21 '24 15:10 github-actions[bot]

PR approved by anyone and no changes requested.

github-actions[bot] avatar Oct 21 '24 15:10 github-actions[bot]

run buildall

zy-kkk avatar Oct 21 '24 15:10 zy-kkk

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] avatar Oct 21 '24 15:10 github-actions[bot]

TeamCity be ut coverage result: Function Coverage: 37.46% (9699/25892) Line Coverage: 28.71% (80528/280477) Region Coverage: 28.15% (41660/147991) Branch Coverage: 24.72% (21172/85638) Coverage Report: http://coverage.selectdb-in.cc/coverage/892dfc39e0214f97a63bd213c753ac47d3b9b0c7_892dfc39e0214f97a63bd213c753ac47d3b9b0c7/report/index.html

doris-robot avatar Oct 21 '24 16:10 doris-robot

run buildall

zy-kkk avatar Oct 21 '24 18:10 zy-kkk

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] avatar Oct 21 '24 18:10 github-actions[bot]

TeamCity be ut coverage result: Function Coverage: 37.46% (9698/25892) Line Coverage: 28.70% (80490/280477) Region Coverage: 28.14% (41644/147991) Branch Coverage: 24.71% (21164/85638) Coverage Report: http://coverage.selectdb-in.cc/coverage/7d0493839634f25e4c24deaac9f671ecf4358eb4_7d0493839634f25e4c24deaac9f671ecf4358eb4/report/index.html

doris-robot avatar Oct 21 '24 19:10 doris-robot

run buildall

zy-kkk avatar Oct 22 '24 03:10 zy-kkk

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] avatar Oct 22 '24 03:10 github-actions[bot]

PR approved by at least one committer and no changes requested.

github-actions[bot] avatar Oct 22 '24 04:10 github-actions[bot]

TeamCity be ut coverage result: Function Coverage: 37.45% (9702/25908) Line Coverage: 28.71% (80533/280533) Region Coverage: 28.14% (41654/148014) Branch Coverage: 24.71% (21165/85644) Coverage Report: http://coverage.selectdb-in.cc/coverage/758e9f4f2f5a55c65026468faaaa074b9dea429f_758e9f4f2f5a55c65026468faaaa074b9dea429f/report/index.html

doris-robot avatar Oct 22 '24 05:10 doris-robot

Hi @zy-kkk , has this feature been merged into 2.1.8 or 2.1.9?

I'm having connection pooling related issues, but I don't need and would like to turn off it, but I don't find this parameter in the documentation.

Issue: https://doris-forum.org.cn/questions/D11A3/jdbc-catalog-lian-jie-chao-shi-hikaripool-102-connection-is-not-available-request-timed-out

Documentation:https://doris.apache.org/zh-CN/docs/lakehouse/database/jdbc#%E5%9F%BA%E6%9C%AC%E5%B1%9E%E6%80%A7

Thanks!

yuki-node avatar May 07 '25 02:05 yuki-node