Giter VIP home page Giter VIP logo

Comments (3)

xu-huadong avatar xu-huadong commented on August 21, 2024

dataSources:
ds1:
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
driverClassName: oracle.jdbc.OracleDriver
jdbcUrl : jdbc:**********
username: user
password: 123456
connectionTimeoutMilliseconds: 28000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 500
minPoolSize: 100
rules:

  • !SHARDING
    tables:
    T_ORDER:
    actualDataNodes: ds1.T_ORDER_$->{0..2}
    tableStrategy:
    standard:
    shardingColumn: ORDER_ID
    shardingAlgorithmName: t_order_inline
    keyGenerateStrategy:
    column: ORDER_ID
    keyGeneratorName: snowflake
    auditStrategy:
    auditorNames:
    - sharding_key_required_auditor
    allowHintDisable: true

    shardingAlgorithms:
    t_order_inline:
    type: INLINE
    props:
    algorithm-expression: T_ORDER_${ORDER_ID% 3}
    keyGenerators:
    snowflake:
    type: SNOWFLAKE
    auditors:
    sharding_key_required_auditor:
    type: DML_SHARDING_CONDITIONS

props:
sql-show: true

from shardingsphere.

TherChenYang avatar TherChenYang commented on August 21, 2024

@xu-huadong I think this is not an issue with ShardingSpehere. When you start springboot, HikariCP completes the initialization work of related thread pools, including but not limited to starting several internal thread pools according to the configuration, creating initial connections according to the configuration, and validating connections based on initSql in the configuration. These are necessary processes during startup. After initializing the connection pool, you can then obtain corresponding connections from the connection pool to execute SQL statements.

from shardingsphere.

xu-huadong avatar xu-huadong commented on August 21, 2024

thank you !

from shardingsphere.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.