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

[GitHub] [shardingsphere] TeslaCN opened a new issue, #24415: java.lang.IllegalStateException: Recursive update caused by #24251

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

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   
   Commits after #24251.
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-Proxy MySQL
   
   ### Expected behavior
   
   No error occurred.
   
   ### Actual behavior
   
   https://github.com/apache/shardingsphere/actions/runs/4303040471/jobs/7502282053
   
   ```
   java.util.ServiceConfigurationError: org.apache.shardingsphere.proxy.backend.mysql.handler.admin.MySQLSessionVariableHandler: Provider org.apache.shardingsphere.proxy.backend.mysql.handler.admin.MySQLDefaultSessionVariableHandler could not be instantiated
   
   	at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:586)
   	at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:813)
   	at java.base/java.util.ServiceLoader$ProviderImpl.get(ServiceLoader.java:729)
   	at java.base/java.util.ServiceLoader$3.next(ServiceLoader.java:1403)
   	at org.apache.shardingsphere.infra.util.spi.ShardingSphereServiceLoader.load(ShardingSphereServiceLoader.java:56)
   	at org.apache.shardingsphere.infra.util.spi.ShardingSphereServiceLoader.<init>(ShardingSphereServiceLoader.java:46)
   	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
   	at org.apache.shardingsphere.infra.util.spi.ShardingSphereServiceLoader.getServiceInstances(ShardingSphereServiceLoader.java:73)
   	at org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPILoader.findService(TypedSPILoader.java:71)
   	at org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPILoader.getService(TypedSPILoader.java:126)
   	at org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPILoader.getService(TypedSPILoader.java:113)
   	at org.apache.shardingsphere.proxy.backend.mysql.handler.admin.MySQLSetVariableAdminExecutor.lambda$execute$0(MySQLSetVariableAdminExecutor.java:56)
   	at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:180)
   	at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
   	at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1715)
   	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
   	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
   	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
   	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
   	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
   	at org.apache.shardingsphere.proxy.backend.mysql.handler.admin.MySQLSetVariableAdminExecutor.execute(MySQLSetVariableAdminExecutor.java:56)
   	at org.apache.shardingsphere.proxy.backend.mysql.handler.admin.executor.MySQLSetVariableAdminExecutorTest.assertExecute(MySQLSetVariableAdminExecutorTest.java:66)
   	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
   	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
   	... Omit JUnit stack traces
   Caused by: java.lang.IllegalStateException: Recursive update
   	at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1763)
   	at org.apache.shardingsphere.infra.util.spi.ShardingSphereServiceLoader.getServiceInstances(ShardingSphereServiceLoader.java:73)
   	at org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPILoader.findService(TypedSPILoader.java:71)
   	at org.apache.shardingsphere.infra.util.spi.type.typed.TypedSPILoader.findService(TypedSPILoader.java:55)
   	at org.apache.shardingsphere.proxy.backend.handler.admin.executor.DefaultSessionVariableHandler.<init>(DefaultSessionVariableHandler.java:36)
   	at org.apache.shardingsphere.proxy.backend.mysql.handler.admin.MySQLDefaultSessionVariableHandler.<init>(MySQLDefaultSessionVariableHandler.java:28)
   	at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67)
   	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
   	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:484)
   	at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:789)
   	... 88 more
   ```
   


-- 
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] TeslaCN commented on issue #24415: java.lang.IllegalStateException: Recursive update caused by #24251

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

   I found a way to reproduce this issue.
   
   Make the following changes and run tests.
   ```java
    public final class ShardingSphereServiceLoader<T> {
        
   -    private static final Map<Class<?>, ShardingSphereServiceLoader<?>> LOADERS = new ConcurrentHashMap<>();
   +    private static final Map<Class<?>, ShardingSphereServiceLoader<?>> LOADERS = new ConcurrentHashMap<>(1, 10f);
        
        private final Class<T> serviceInterface;
   ```


-- 
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] strongduanmu closed issue #24415: java.lang.IllegalStateException: Recursive update caused by #24251

Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu closed issue #24415: java.lang.IllegalStateException: Recursive update caused by #24251
URL: https://github.com/apache/shardingsphere/issues/24415


-- 
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