mirromutth / r2dbc-mysql

R2DBC MySQL Implementation
Apache License 2.0
656 stars 100 forks source link

Cannot obtain connection after duplicate exception from the DB #87

Open olexandra-dmytrenko opened 4 years ago

olexandra-dmytrenko commented 4 years ago

Steps to reproduce: 1) Upload large amount (4700) records to a table 2) Try to upload the same records for the second time 3) Receive duplicate entry exception 4) Leave table in the same state or erase or all the records. 5) Upload same records another time *)

Expected: Depending on the step 4 either receive Duplicate entry exception or successfully uploaded records

Actual: Timeout exception for getting access to the DB from all the services including HeidiSQL. The DB starts working again only when Docker that ran it is stopped and then started

*) Tried also uploading smaller amount of data, e.g. 1200 records, and doing the same steps with it. I've successfully received Duplicate exception several times in a row, but then the application hangs without writing anything to log and never finishing request:

//end of previous request
[WARN] 2019-11-21 02:11:44.766+0200 dev.miku.r2dbc.mysql.client.MessageDuplexCodec (reactor-tcp-nio-7) - Error: error code 1062, sql state: 23000, message: Duplicate entry 'A' for key 'ID_2'
//new request
[INFO] 2019-11-21 02:12:14.647+0200 Inserted new data to DB (reactor-http-nio-2) - | onSubscribe([Fuseable] FluxMapFuseable.MapFuseableSubscriber)
[INFO] 2019-11-21 02:12:14.647+0200 Inserted new data to DB (reactor-http-nio-2) - | request(unbounded)

Settings: Versions in Java: private val SpringBootVersion = "2.2.1.RELEASE" private val r2dbcVersion = "0.8.0.RC2" springDataR2dbcVersion = "1.0.0.RC1" private val projectReactor = "3.3.0.RELEASE" val springDatar2dbc = "org.springframework.data" % "spring-data-r2dbc" % springDataR2dbcVersion val r2dbc = "io.r2dbc" % "r2dbc-spi" % r2dbcVersion val r2dbcMySql = "dev.miku" % "r2dbc-mysql" % "0.8.0.RC2" val r2dbcPool = "io.r2dbc" % "r2dbc-pool" % "0.8.0.RC2" val reactorAddons = "io.projectreactor.addons" % "reactor-extra" % projectReactor

Docker MySQL Settings services: mysql: hostname: mysql image: mysql:5.7.23 command: --default-authentication-plugin=mysql_native_password ports:

mirromutth commented 4 years ago

Hi there,

Thanks for the report.

I tried, but have not reproduce this. Did you use createBatch for insert records, or createStatement with multiple bindings for insert, or just Repository.saveAll? They are different, so I maybe need to know what happened.

One more thing, the ConnectionPool is also a ConnectionFactory, and the pool seems like be created on pooling ConnectionFactory (see line .option(DRIVER, "pool") in method connectionFactory()).

So I suggest the code should be rewritten to something like:

@Slf4j
@Configuration
@RequiredArgsConstructor
@EnableTransactionManagement(proxyTargetClass = true)
public class DataConfig extends AbstractR2dbcConfiguration {

    @Override
    @Bean
    public ConnectionFactory connectionFactory() {
        ConnectionFactory connectionFactory = ConnectionFactories.get(ConnectionFactoryOptions.builder()
            .option(DRIVER, "mysql") // should not be "pool"
            .option(SSL, true)
            .option(HOST, "127.0.0.1")
            .option(PORT, 3306)
            .option(USER, "me")
            .option(PASSWORD, "pass")
            .option(DATABASE, "db")
            .option(CONNECT_TIMEOUT, ofSeconds(20))
            .build()); // no MAX_SIZE because it should be configured by following
        ConnectionPoolConfiguration configuration = ConnectionPoolConfiguration
            .builder(connectionFactory)
            .maxAcquireTime(ofSeconds(5))
            .maxCreateConnectionTime(ofSeconds(5))
            .maxIdleTime(ofSeconds(1))
            .maxLifeTime(ofSeconds(2))
            .maxSize(101)
            .build();
        return new ConnectionPool(configuration);
    }
...
}
olexandra-dmytrenko commented 4 years ago

I tried without the Driver=pool setting, but then saving could not take place at all. I received OutOfMemoryException as I remember, but I didn't setup ConnectionPool back than. Will try it. I guess the difference between how you tried is in saveAll(). I use save() for every record through SpringData.

mirromutth commented 4 years ago

Sorry, but I still be not reproduce this problem.

  1. First time, I ran it on my computer but connections just be aborted by timeout and throw lots of abort exception loggings.
  2. Then, I removed all timeout options and ran it again. I got connection pool down (connections are closed by peer, not OOM or resources exhausted), but database work well (on Docker)

Connection pool down should be not a reason of this problem, I will test this pooling down problem.

Could you try it again with r2dbc-mysql:0.8.1.BUILD-SNAPSHOT and spring-data-r2dbc:1.0.0.RELEASE? The r2dbc-mysql:0.8.1.BUILD-SNAPSHOT is using client-preparing statements instead of server-preparing, it should be different. And spring-data-r2dbc:1.0.0.RELEASE will be more stable than RC1 version.

Should add Maven Snapshots Repository if you want use SNAPSHOT version, see README Snapshots Repository URL: https://oss.sonatype.org/content/repositories/snapshots

And, I have a suggestion, it has no relation of this problem:

Sure, only 5000 records can not be called "massive". But if you try to use massiveRecords.flatMap(repository::save), it maybe exhaust lots of resources (e.g. memory, prepared cursors, etc.) of client or server. Could be use massiveRecords.concatMap(repository::save) or repository.saveAll(massiveRecords) instead. This usage is also the case for most applications, and is also a direct alternative to the saving of foreach on the BIO model. See also Javadoc Flux.flatMap

BBream commented 4 years ago

I think this issue reproduce on 2 conditions.

  1. Try insert the duplicated.
  2. 'autoCommit' is false(or with beginTransaction() statement)

My test was failed and it took about 50 seconds. I know this test is always failed. The important thing is that it took 50 seconds until failed. I don't know other clue why test take too long but it is occurred by autoCommit condition.

Here is test environment, test code, running code, and failure trace:

Test environment


  - ConnectionFactory option:
```java
    @Bean
    public ConnectionFactory connectionFactory() {
        ConnectionFactoryOptions options = ConnectionFactoryOptions.builder()
                .option(ConnectionFactoryOptions.DRIVER, driver)
                .option(ConnectionFactoryOptions.HOST, host)
                .option(ConnectionFactoryOptions.PORT, port)  // optional, default 3306
                .option(ConnectionFactoryOptions.USER, username)
                .option(ConnectionFactoryOptions.PASSWORD, password) // optional, default null, null means has no password
                .option(ConnectionFactoryOptions.DATABASE, database) // optional, default null, null means not specifying the database
                .option(ConnectionFactoryOptions.CONNECT_TIMEOUT, Duration.ofSeconds(10)) // optional, default null, null means no timeout
                .option(ConnectionFactoryOptions.SSL, false) // optional, default is enabled, it will be ignore if "sslMode" is set
                .build();
            ConnectionFactory cf = (ConnectionFactory) ConnectionFactories.get(options);

            return cf;
    }

Test code

...
    private PortalUser inserted = new PortalUser("TestUser1", ...some test data);
    private PortalUser newUser = new PortalUser("TestUser2", ...other test data);

    @Autowired
    PortalUserDao portalUserDao;

    @BeforeEach
    public void initialize() {
        portalUserDao.delete(inserted);
        portalUserDao.delete(newUser);
        portalUserDao.insert(inserted).block();
    }

    @AfterEach
    public void deinitilze() {
        portalUserDao.delete(inserted);
        portalUserDao.delete(newUser);
    }

    @Test
    public void testInsertIfDuplicatedId() {
        // It is hanged out on this statement.
        facilityUserDao.insert(inserted).block();
        FacilityUser actual = facilityUserDao.findById(inserted.getCode(), inserted.getId()).block();
        //assertEquals(user2, actual);
        assertEquals(inserted.getCode(), actual.getCode());
        assertEquals(inserted.getId(), actual.getId());
    }
...

Running code

...
    public Mono<PortalUser> insert(PortalUser user) {
        return Mono.from(connectionFactory.create())
                // That's problem. It took about 50 seconds until failed.
                .flatMap(c -> Mono.from(c.beginTransaction())
                // or .flatMap(c -> Mono.from(c.setAutoCommit(false))

                // No problem. Just throw exception and test is failed.
                //.flatMap(c -> Mono.from(c.setAutoCommit(true))
                    .then(Mono.from(c.createStatement(
                        "INSERT INTO PortalUser (id, encPassword, encName, encJuminNo, salt, regDate) VALUES (?,?,?,?,?,now())")
                        .bind(0, user.getId())
                        .bind(1, user.getPasswd())
                        .bind(2, user.getEncName())
                        .bind(3, user.getEncJuminNo())
                        .bind(4, user.getSalt())
                        .execute()))
                .delayUntil(r -> c.commitTransaction())
                .map(result -> result.map((row, meta) -> 
                    new PortalUser(row.get("id", String.class),
                    user.getPasswd(),
                    user.getEncName(),
                    user.getEncJuminNo(),
                    user.getSalt())))
                .flatMap(pub -> Mono.from(pub))
                .doFinally((st) -> c.close()));
    }
...

Failure trace

io.r2dbc.spi.R2dbcDataIntegrityViolationException: [1062] [23000] Duplicate entry 'TestUser1' for key 'PRIMARY'
    at dev.miku.r2dbc.mysql.ExceptionFactory.createException(ExceptionFactory.java:94)
    at dev.miku.r2dbc.mysql.QueryFlow$Handler.accept(QueryFlow.java:377)
    at dev.miku.r2dbc.mysql.QueryFlow$Handler.accept(QueryFlow.java:366)
    at reactor.core.publisher.FluxHandleFuseable$HandleFuseableSubscriber.onNext(FluxHandleFuseable.java:163)
    at reactor.core.publisher.FluxContextStart$ContextStartSubscriber.onNext(FluxContextStart.java:103)
    at dev.miku.r2dbc.mysql.util.DiscardOnCancelSubscriber.onNext(DiscardOnCancelSubscriber.java:65)
...
    at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1050)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.lang.Thread.run(Thread.java:748)
    Suppressed: java.lang.Exception: #block terminated with an error
        at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:93)
        at reactor.core.publisher.Mono.block(Mono.java:1663)
        at k2web.entity.PortalUserDaoTest.testInsertIfDuplicatedId(PortalUserDaoTest.java:53)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:675)
        at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
...
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
    Suppressed: io.r2dbc.spi.R2dbcTimeoutException: [1205] [HY000] Lock wait timeout exceeded; try restarting transaction
        at dev.miku.r2dbc.mysql.ExceptionFactory.createException(ExceptionFactory.java:69)
        ... 44 more
        Suppressed: java.lang.Exception: #block terminated with an error
            at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:93)
            at reactor.core.publisher.Mono.block(Mono.java:1663)
            at k2web.entity.PortalUserDao.delete(PortalUserDao.java:138)
            at k2web.entity.PortalUserDaoTest.deinitilze(PortalUserDaoTest.java:39)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:675)
            at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
...
            at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
olexandra-dmytrenko commented 4 years ago

The issue appeared much faster when the duplicates happened. As if the connection was not closed and fewer records could be written. At the same time, I looked at the stats of the DB and didn't find anything suspicious to me. We chose to use another DB and I also switched the project, so I cannot assist with this issue anymore. Can only tell what I remember.

Thanks for your support.

On Mon, Feb 10, 2020 at 6:35 AM BBream notifications@github.com wrote:

I think this issue reproduce on 2 conditions.

  1. Try insert the duplicated.
  2. 'autoCommit' is false(or with beginTransaction() statement)

My test was failed and it took about 50 seconds. I know this test is always failed. The important thing is that it took 50 seconds until failed. I don't know other clue why test take too long but it is occurred by autoCommit condition.

Here is test environment, test code, running code, and failure trace:

Test environment:

-

r2dbc-mysql version: 0.8.1.RELEASE

jdk version: openjdk-1.8.0.232-1

In mysql docker-compose.yml:

mysql: image: mysql:8.0.1 command: --default-authentication-plugin=mysql_native_password --lower-case-table-names=1 --character-set-server=utf8 --collation-server=utf8_general_ci ... other setting

Test code:

... private PortalUser inserted = new PortalUser("TestUser1", ...some test data); private PortalUser newUser = new PortalUser("TestUser2", ...other test data);

@Autowired PortalUserDao portalUserDao;

@BeforeEach public void initialize() { portalUserDao.delete(inserted); portalUserDao.delete(newUser); portalUserDao.insert(inserted).block(); }

@AfterEach public void deinitilze() { portalUserDao.delete(inserted); portalUserDao.delete(newUser); }

@Test public void testInsertIfDuplicatedId() { // It is hanged out on this statement. facilityUserDao.insert(inserted).block(); FacilityUser actual = facilityUserDao.findById(inserted.getCode(), inserted.getId()).block(); //assertEquals(user2, actual); assertEquals(inserted.getCode(), actual.getCode()); assertEquals(inserted.getId(), actual.getId()); }...

Running code:

... public Mono insert(PortalUser user) { return Mono.from(connectionFactory.create()) // That's problem. It took about 50 seconds until failed. .flatMap(c -> Mono.from(c.beginTransaction()) // or .flatMap(c -> Mono.from(c.setAutoCommit(false))

          // No problem. Just throw exception and test is failed.
          //.flatMap(c -> Mono.from(c.setAutoCommit(true))
              .then(Mono.from(c.createStatement(
                  "INSERT INTO PortalUser (id, encPassword, encName, encJuminNo, salt, regDate) VALUES (?,?,?,?,?,now())")
                  .bind(0, user.getId())
                  .bind(1, user.getPasswd())
                  .bind(2, user.getEncName())
                  .bind(3, user.getEncJuminNo())
                  .bind(4, user.getSalt())
                  .execute()))
            .delayUntil(r -> c.commitTransaction())
            .map(result -> result.map((row, meta) ->
              new PortalUser(row.get("id", String.class),
              user.getPasswd(),
              user.getEncName(),
              user.getEncJuminNo(),
              user.getSalt())))
            .flatMap(pub -> Mono.from(pub))
            .doFinally((st) -> c.close()));
}...

Failure trace:

io.r2dbc.spi.R2dbcDataIntegrityViolationException: [1062] [23000] Duplicate entry 'TestUser1' for key 'PRIMARY' at dev.miku.r2dbc.mysql.ExceptionFactory.createException(ExceptionFactory.java:94) at dev.miku.r2dbc.mysql.QueryFlow$Handler.accept(QueryFlow.java:396) at dev.miku.r2dbc.mysql.QueryFlow$Handler.accept(QueryFlow.java:385) at reactor.core.publisher.FluxHandleFuseable$HandleFuseableSubscriber.onNext(FluxHandleFuseable.java:163) at reactor.core.publisher.FluxContextStart$ContextStartSubscriber.onNext(FluxContextStart.java:103) at dev.miku.r2dbc.mysql.util.DiscardOnCancelSubscriber.onNext(DiscardOnCancelSubscriber.java:65) at reactor.core.publisher.MonoFlatMapMany$FlatMapManyInner.onNext(MonoFlatMapMany.java:242) at reactor.core.publisher.FluxPeek$PeekSubscriber.onNext(FluxPeek.java:192) at reactor.core.publisher.FluxPeek$PeekSubscriber.onNext(FluxPeek.java:192) at reactor.core.publisher.FluxHandle$HandleSubscriber.onNext(FluxHandle.java:112) at reactor.core.publisher.FluxConcatArray$ConcatArraySubscriber.onNext(FluxConcatArray.java:176) at reactor.core.publisher.EmitterProcessor.drain(EmitterProcessor.java:426) at reactor.core.publisher.EmitterProcessor.onNext(EmitterProcessor.java:268) at reactor.core.publisher.LambdaSubscriber.onNext(LambdaSubscriber.java:160) at reactor.core.publisher.FluxHandle$HandleSubscriber.onNext(FluxHandle.java:112) at reactor.netty.channel.FluxReceive.drainReceiver(FluxReceive.java:218) at reactor.netty.channel.FluxReceive.onInboundNext(FluxReceive.java:351) at reactor.netty.channel.ChannelOperations.onInboundNext(ChannelOperations.java:348) at reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:89) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) at dev.miku.r2dbc.mysql.client.MessageDuplexCodec.channelRead(MessageDuplexCodec.java:96) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:326) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:300) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1422) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:931) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:700) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:635) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:552) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:514) at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1050) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748) Suppressed: java.lang.Exception: #block terminated with an error at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:93) at reactor.core.publisher.Mono.block(Mono.java:1663) at k2web.entity.PortalUserDaoTest.testInsertIfDuplicatedId(PortalUserDaoTest.java:53) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:675) at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:125) at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:132) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:124) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:74) at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115) at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:104) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:62) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:43) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:35) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:202) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:198) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:69) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) at java.util.ArrayList.forEach(ArrayList.java:1257) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) at java.util.ArrayList.forEach(ArrayList.java:1257) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:229) at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:197) at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:211) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:191) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:137) at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:89) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:542) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210) Suppressed: io.r2dbc.spi.R2dbcTimeoutException: [1205] [HY000] Lock wait timeout exceeded; try restarting transaction at dev.miku.r2dbc.mysql.ExceptionFactory.createException(ExceptionFactory.java:69) ... 43 more Suppressed: java.lang.Exception: #block terminated with an error at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:93) at reactor.core.publisher.Mono.block(Mono.java:1663) at k2web.entity.PortalUserDao.delete(PortalUserDao.java:143) at k2web.entity.PortalUserDaoTest.deinitilze(PortalUserDaoTest.java:39) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:675) at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:125) at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:132) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:111) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptAfterEachMethod(TimeoutExtension.java:95) at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115) at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:104) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:62) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:43) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:35) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104) at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeMethodInExtensionContext(ClassBasedTestDescriptor.java:464) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$synthesizeAfterEachMethodAdapter$17(ClassBasedTestDescriptor.java:454) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAfterEachMethods$9(TestMethodTestDescriptor.java:228) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAllAfterMethodsOrCallbacks$12(TestMethodTestDescriptor.java:256) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAllAfterMethodsOrCallbacks$13(TestMethodTestDescriptor.java:256) at java.util.ArrayList.forEach(ArrayList.java:1257) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeAllAfterMethodsOrCallbacks(TestMethodTestDescriptor.java:255) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeAfterEachMethods(TestMethodTestDescriptor.java:226) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:139) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:69) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) at java.util.ArrayList.forEach(ArrayList.java:1257) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) at java.util.ArrayList.forEach(ArrayList.java:1257) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:229) at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:197) at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:211) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:191) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:137) at org.eclipse.jdt.internal.junit5.runner.JUnit5TestReference.run(JUnit5TestReference.java:89) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:542) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mirromutth/r2dbc-mysql/issues/87?email_source=notifications&email_token=AANJJC4PGD35R4EDPMLN7SDRCDKR7A5CNFSM4JQA7V6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELHGJGY#issuecomment-583951515, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANJJC3DNCKVZKAIOSYHHDDRCDKR7ANCNFSM4JQA7V6A .

-- С уважением, Александра