snowflakedb / snowflake-jdbc

Snowflake JDBC Driver
Apache License 2.0
173 stars 164 forks source link

SNOW-1335472: Use `ReentrantLock` instead of `synchronized` for `SFSession#open` #1795

Open jtb93 opened 3 months ago

jtb93 commented 3 months ago

Overview

SNOW-1335472

Pre-review self checklist

External contributors - please answer these questions before submitting a pull request. Thanks!

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes #1729

  2. Fill out the following pre-review checklist:

    • [ ] I am adding a new automated test(s) to verify correctness of my new code
    • [ ] I am adding new logging messages
    • [ ] I am modifying authorization mechanisms
    • [ ] I am adding new credentials
    • [ ] I am modifying OCSP code
    • [ ] I am adding a new dependency or upgrading an existing one
    • [ ] I am adding new public/protected component not marked with @SnowflakeJdbcInternalApi (note that public/protected methods/fields in classes marked with this annotation are already internal)
  3. Please describe how your code solves the related issue.

Virtual thread pinning occurs when I/O is performed within a synchronized method or block. Pinning can significantly hamper performance. See MariaDB (updated to avoid pinning) vs. MySQL (not updated to avoid pinning) JDBC driver performance comparison.

github-actions[bot] commented 3 months ago


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.