wsm12138 opened a new issue #12514:
URL: https://github.com/apache/shardingsphere/issues/12514


   ## Bug Report
   Hi community,
   ### Which version of ShardingSphere did you use?
   master
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   ### Expected behavior
   
   ### Actual behavior
   ```
   [ERROR] 2021-09-16 19:29:24.000 [ShardingSphere-Command-9] 
o.a.s.p.f.c.CommandExecutorTask - Exception occur:
   java.util.ConcurrentModificationException: null
        at java.util.HashMap.forEach(HashMap.java:1292)
        at 
org.apache.shardingsphere.singletable.rule.SingleTableRule.getAllDataNodes(SingleTableRule.java:122)
        at 
org.apache.shardingsphere.infra.datanode.DataNodes.isDataNodeContainedRuleContainsTable(DataNodes.java:69)
        at 
org.apache.shardingsphere.infra.datanode.DataNodes.lambda$getDataNodes$0(DataNodes.java:51)
        at 
java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
        at java.util.LinkedList$LLSpliterator.tryAdvance(LinkedList.java:1249)
        at 
java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
        at 
java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
        at 
java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
        at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at 
java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:531)
        at 
org.apache.shardingsphere.infra.datanode.DataNodes.getDataNodes(DataNodes.java:51)
        at 
org.apache.shardingsphere.infra.metadata.schema.builder.util.TableMetaDataUtil.getTableMetaDataLoadMaterial(TableMetaDataUtil.java:55)
        at 
org.apache.shardingsphere.singletable.metadata.SingleTableMetaDataBuilder.load(SingleTableMetaDataBuilder.java:51)
        at 
org.apache.shardingsphere.singletable.metadata.SingleTableMetaDataBuilder.load(SingleTableMetaDataBuilder.java:42)
        at 
org.apache.shardingsphere.infra.metadata.schema.builder.TableMetaDataBuilder.load(TableMetaDataBuilder.java:79)
        at 
org.apache.shardingsphere.infra.metadata.schema.builder.TableMetaDataBuilder.build(TableMetaDataBuilder.java:58)
        at 
org.apache.shardingsphere.infra.metadata.schema.refresher.type.CreateTableStatementSchemaRefresher.refresh(CreateTableStatementSchemaRefresher.java:47)
        at 
org.apache.shardingsphere.infra.metadata.schema.refresher.type.CreateTableStatementSchemaRefresher.refresh(CreateTableStatementSchemaRefresher.java:36)
        at 
org.apache.shardingsphere.infra.context.refresher.MetadataRefreshEngine.refresh(MetadataRefreshEngine.java:77)
        at 
org.apache.shardingsphere.infra.context.refresher.MetadataRefreshEngine.refresh(MetadataRefreshEngine.java:64)
        at 
org.apache.shardingsphere.proxy.backend.communication.ProxyLockEngine.refreshMetadata(ProxyLockEngine.java:110)
        at 
org.apache.shardingsphere.proxy.backend.communication.ProxyLockEngine.doExecute(ProxyLockEngine.java:104)
        at 
org.apache.shardingsphere.proxy.backend.communication.ProxyLockEngine.execute(ProxyLockEngine.java:81)
        at 
org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.execute(DatabaseCommunicationEngine.java:126)
        at 
org.apache.shardingsphere.proxy.backend.text.data.impl.SchemaAssignedDatabaseBackendHandler.execute(SchemaAssignedDatabaseBackendHandler.java:55)
        at 
org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:57)
        at 
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:99)
        at 
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:72)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
   Thanks for using Atomikos! Evaluate 
http://www.atomikos.com/Main/ExtremeTransactions for advanced features and 
professional support
   or register at http://www.atomikos.com/Main/RegisterYourDownload to disable 
this message and receive FREE tips & advice
   [INFO ] 2021-09-16 19:35:38.765 [main] o.a.s.p.i.BootstrapInitializer - 
Database name is `MySQL`, version is `8.0.25`
   [INFO ] 2021-09-16 19:35:38.988 [main] o.a.s.p.frontend.ShardingSphereProxy 
- ShardingSphere-Proxy start success
   ```
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   
   ### Example codes for reproduce this issue (such as a github link).
   server.yaml
   ```
   rules:
     - !AUTHORITY
       users:
         - root@%:root
         - sharding@:sharding
       provider:
         type: ALL_PRIVILEGES_PERMITTED
   
   #scaling:
   #  blockQueueSize: 10000
   #  workerThread: 40
   
   props:
     max-connections-size-per-query: 1
     executor-size: 16  # Infinite by default.
     proxy-frontend-flush-threshold: 128  # The default value is 128.
       # LOCAL: Proxy will run with LOCAL transaction.
       # XA: Proxy will run with XA transaction.
       # BASE: Proxy will run with B.A.S.E transaction.
     proxy-transaction-type: LOCAL
     xa-transaction-manager-type: Atomikos
     proxy-opentracing-enabled: false
     proxy-hint-enabled: false
     sql-show: false
     check-table-metadata-enabled: false
     lock-wait-timeout-milliseconds: 50000 # The maximum time to wait for a lock
       # Proxy backend query fetch size. A larger value may increase the memory 
usage of ShardingSphere Proxy.
       # The default value is -1, which means set the minimum value for 
different JDBC drivers.
     proxy-backend-query-fetch-size: -1
   ```
   
   config-readwrite-splitting.yaml
   ```
   schemaName: sbtest
   
   dataSources:
     write_ds:
       url: jdbc:mysql://ip:port/sbtest?serverTimezone=UTC&useSSL=false
       username: root
       password: password
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 2000
       minPoolSize: 1
     read_ds_0:
       url: jdbc:mysql://ip:port/sbtest?serverTimezone=UTC&useSSL=false
       username: root
       password: password
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 2000
       minPoolSize: 1
   
   
   rules:
   - !READWRITE_SPLITTING
     dataSources:
       pr_ds:
         writeDataSourceName: write_ds
         readDataSourceNames:
           - read_ds_0
   ```
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to