Git Product home page Git Product logo

Comments (6)

mp911de avatar mp911de commented on June 14, 2024

portal "B_986" does not exist is caused typically when using pgbouncer and related to R2DBC Postgres.

from r2dbc-proxy.

ttddyy avatar ttddyy commented on June 14, 2024

I have created a small project trying to repro.
At some point, I saw portal "<somenumber>" does not exist. I thought I have reproduced, but now I am not getting the one but different one.

I put my sample project here.
https://github.com/ttddyy/r2dbc-issues/tree/master/proxy-54-proxy_on_pool

I used my local postgres(9.6.15) on osx.

My error seems only happening when r2dbc-postgres, r2dbc-pool, and r2dbc-proxy, all 3 are combined.
I didn't observe error only pool or proxy is applied, or none is applied.
Also, didn't observe with r2dbc-h2 with combination of pool and proxy.

Issue-1

Env : r2dbc-pool & r2dbc-proxy =0.8.0, r2dbc-postgres=0.8.0.

I saw IndefiniteStatementCache throws ConcurrentHashModification error at this line.

stack trace

So, I updated the HashMap to ConcurrentHashMap and applied to current 0.8.x(0.8.1.BUILD-SNAPSHOT) and master.

Issue-2

Env : r2dbc-pool & r2dbc-proxy =0.8.0, r2dbc-postgres=0.8.x or master(0.9.0.BUILD-SNAPSHOT) with ConcurrentHashMap change.

Now, I see this warning:

2020-01-17 12:48:17.071  WARN 22239 --- [actor-tcp-nio-7] i.r.p.client.ReactorNettyClient          : Notice: SEVERITY_LOCALIZED=WARNING, SEVERITY_NON_LOCALIZED=WARNING, CODE=25P01, MESSAGE=there is no transaction in progress, FILE=xact.c, LINE=3623, ROUTINE=EndTransactionBlock

Then, sometimes I see this error:

java.lang.IllegalArgumentException: rowDescription must not be null
	at io.r2dbc.postgresql.util.Assert.requireNonNull(Assert.java:71) ~[r2dbc-postgresql-0.9.0.BUILD-SNAPSHOT.jar:0.9.0.BUILD-SNAPSHOT]
	at io.r2dbc.postgresql.PostgresqlRow.toRow(PostgresqlRow.java:114) ~[r2dbc-postgresql-0.9.0.BUILD-SNAPSHOT.jar:0.9.0.BUILD-SNAPSHOT]
	at io.r2dbc.postgresql.PostgresqlResult.lambda$map$1(PostgresqlResult.java:96) ~[r2dbc-postgresql-0.9.0.BUILD-SNAPSHOT.jar:0.9.0.BUILD-SNAPSHOT]
	at reactor.core.publisher.FluxHandle$HandleSubscriber.onNext(FluxHandle.java:96) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxHandle$HandleConditionalSubscriber.onNext(FluxHandle.java:319) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxTakeUntil$TakeUntilPredicateSubscriber.onNext(FluxTakeUntil.java:77) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxWindowPredicate$WindowFlux.drainRegular(FluxWindowPredicate.java:650) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxWindowPredicate$WindowFlux.drain(FluxWindowPredicate.java:728) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxWindowPredicate$WindowFlux.onNext(FluxWindowPredicate.java:770) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxWindowPredicate$WindowPredicateMain.onNext(FluxWindowPredicate.java:249) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxFilter$FilterSubscriber.onNext(FluxFilter.java:107) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoFlatMapMany$FlatMapManyInner.onNext(MonoFlatMapMany.java:242) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.MonoFlatMapMany$FlatMapManyInner.onNext(MonoFlatMapMany.java:242) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onNext(FluxPeekFuseable.java:203) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxWindowPredicate$WindowFlux.drainRegular(FluxWindowPredicate.java:650) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxWindowPredicate$WindowFlux.drain(FluxWindowPredicate.java:728) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxWindowPredicate$WindowFlux.onNext(FluxWindowPredicate.java:770) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxWindowPredicate$WindowPredicateMain.onNext(FluxWindowPredicate.java:249) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxPeek$PeekSubscriber.onNext(FluxPeek.java:192) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxHandle$HandleSubscriber.onNext(FluxHandle.java:112) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:213) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onNext(FluxMap.java:213) ~[reactor-core-3.3.2.RELEASE.jar:3.3.2.RELEASE]
	at reactor.netty.channel.FluxReceive.drainReceiver(FluxReceive.java:218) ~[reactor-netty-0.9.3.RELEASE.jar:0.9.3.RELEASE]
	at reactor.netty.channel.FluxReceive.onInboundNext(FluxReceive.java:351) ~[reactor-netty-0.9.3.RELEASE.jar:0.9.3.RELEASE]
	at reactor.netty.channel.ChannelOperations.onInboundNext(ChannelOperations.java:348) ~[reactor-netty-0.9.3.RELEASE.jar:0.9.3.RELEASE]
	at reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:90) ~[reactor-netty-0.9.3.RELEASE.jar:0.9.3.RELEASE]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:321) ~[netty-codec-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:308) ~[netty-codec-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:422) ~[netty-codec-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276) ~[netty-codec-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
	at java.base/java.lang.Thread.run(Thread.java:835) ~[na:na]

from r2dbc-proxy.

mp911de avatar mp911de commented on June 14, 2024

The cache synchronization issue is fixed via pgjdbc/r2dbc-postgresql#232 in 0.8.x and fixed via pgjdbc/r2dbc-postgresql#225 in master.

I need to take a deeper look at the second issue.

from r2dbc-proxy.

mp911de avatar mp911de commented on June 14, 2024

The second issue is likely related to concurrent statement execution. We recently merged a fix (pgjdbc/r2dbc-postgresql#230) to address that issue. For me, both issues are solved with 0.8.1 and 0.9.0 snapshots.

from r2dbc-proxy.

ttddyy avatar ttddyy commented on June 14, 2024

Thanks @mp911de

I have also updated r2dbc-proxy to avoid NPE on cancelation scenario.

Using r2dbc-proxy, r2dbc-postgresq=0.8.1.BUILD-SNAPSHOT and r2dbc-pool=0.8.0, I don't see failures on my quick test on my local.

@deblockt
Can you try with r2dbc-proxy, r2dbc-postgresql=0.8.1.BUILD-SNAPSHOT(or 0.9.0.BUILD-SNAPSHOT), or just wait a bit to 0.8.1 get released and try them?

from r2dbc-proxy.

deblockt avatar deblockt commented on June 14, 2024

thanks @mp911de it seem to work with 0.8.1.BUILD-SNAPSHOT version.

from r2dbc-proxy.

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.