You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "zhaojinchao95 (via GitHub)" <gi...@apache.org> on 2023/02/27 11:12:03 UTC

[GitHub] [shardingsphere] zhaojinchao95 opened a new issue, #24359: Snowflake worker-id always generate zero when use Standalone mode

zhaojinchao95 opened a new issue, #24359:
URL: https://github.com/apache/shardingsphere/issues/24359

   dd16be872a0f24d24e147c58041f7f92a34879d9
   
   ```
   databaseName: sharding_db
   
   dataSources:
     ds_0:
       url: jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
       username: root
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds_1:
       url: jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false
       username: root
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
   
   rules:
   - !SHARDING
     tables:
       t_order:
         actualDataNodes: ds_${0..1}.t_order_${0..1}
         tableStrategy:
           standard:
             shardingColumn: order_id
             shardingAlgorithmName: t_order_inline
         keyGenerateStrategy:
           column: order_id
           keyGeneratorName: snowflake
         auditStrategy:
           auditorNames:
             - sharding_key_required_auditor
           allowHintDisable: true
       t_order_item:
         actualDataNodes: ds_${0..1}.t_order_item_${0..1}
         tableStrategy:
           standard:
             shardingColumn: order_id
             shardingAlgorithmName: t_order_item_inline
         keyGenerateStrategy:
           column: order_item_id
           keyGeneratorName: snowflake
     bindingTables:
       - t_order,t_order_item
     defaultDatabaseStrategy:
       standard:
         shardingColumn: user_id
         shardingAlgorithmName: database_inline
     defaultTableStrategy:
       none:
     defaultAuditStrategy:
       auditorNames:
         - sharding_key_required_auditor
       allowHintDisable: true
   
     shardingAlgorithms:
       database_inline:
         type: INLINE
         props:
           algorithm-expression: ds_${user_id % 2}
       t_order_inline:
         type: INLINE
         props:
           algorithm-expression: t_order_${order_id % 2}
       t_order_item_inline:
         type: INLINE
         props:
           algorithm-expression: t_order_item_${order_id % 2}
   
     keyGenerators:
       snowflake:
         type: SNOWFLAKE
         props:
           worker-id: 1
   
     auditors:
       sharding_key_required_auditor:
         type: DML_SHARDING_CONDITIONS
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] tristaZero closed issue #24359: Snowflake worker-id always generate zero when use Standalone mode

Posted by "tristaZero (via GitHub)" <gi...@apache.org>.
tristaZero closed issue #24359: Snowflake worker-id always generate zero when use Standalone mode
URL: https://github.com/apache/shardingsphere/issues/24359


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] zhaojinchao95 commented on issue #24359: Snowflake worker-id always generate zero when use Standalone mode

Posted by "zhaojinchao95 (via GitHub)" <gi...@apache.org>.
zhaojinchao95 commented on issue #24359:
URL: https://github.com/apache/shardingsphere/issues/24359#issuecomment-1446142767

   ```
   mysql> SHOW COMPUTE NODE INFO;
   +--------------------------------------+--------------+------+--------+------------+-----------+--------+----------------+
   | instance_id                          | host         | port | status | mode_type  | worker_id | labels | version        |
   +--------------------------------------+--------------+------+--------+------------+-----------+--------+----------------+
   | 272beef3-bd70-4f71-9bdd-2eafdd4f1a6f | 192.168.3.75 | 3307 | OK     | Standalone | 0         |        | 5.3.2-SNAPSHOT |
   +--------------------------------------+--------------+------+--------+------------+-----------+--------+----------------+
   1 row in set (0.40 sec)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org