Giter VIP home page Giter VIP logo

Comments (12)

mp911de avatar mp911de commented on June 19, 2024 1

I need to have a look. Thanks for the reproducer.

from r2dbc-mssql.

kschlesselmann avatar kschlesselmann commented on June 19, 2024 1

@mp911de Any news on this? After upgrading to the current Spring Boot Release we experience the same error. Some other tests suddenly run into

Caused by: io.r2dbc.mssql.ExceptionFactory$MssqlNonTransientException: The parameterized query '(@P0_name nvarchar(4000))SELECT attachment.id, attachment.name, ' expects the parameter '@P0_name', which was not supplied.

If I just pin the driver at 1.0.0.RELEASE again everything works fine.

from r2dbc-mssql.

SimenRokaas avatar SimenRokaas commented on June 19, 2024

Same as I commented here a couple of days ago, should perhaps have created an issue like this. Thanks for reporting it as a separate issue @radovanradic !

from r2dbc-mssql.

mp911de avatar mp911de commented on June 19, 2024

@SimenRokaas Can you attach debug logs for the io.r2dbc logger?

from r2dbc-mssql.

SimenRokaas avatar SimenRokaas commented on June 19, 2024

Sure

DEBUG io.r2dbc.pool.ConnectionPool - Obtaining new connection from the pool
DEBUG io.r2dbc.mssql.SimpleMssqlStatement - [cid: 0x9] Start direct exchange for SELECT 1
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0x9] exchange()
DEBUG io.r2dbc.mssql.QUERY - [cid: 0x9] Executing query: SELECT 1
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0x9] exchange(subscribed)
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0x9] Initiating exchange
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0x9] Request: SQLBatch [sql="SELECT 1"]
DEBUG io.r2dbc.pool.ConnectionPool - Obtaining new connection from the pool
DEBUG io.r2dbc.mssql.MssqlConnection - [cid: 0xa] Creating statement for SQL: [SELECT COUNT(*) AS cnt FROM FormEvent WHERE Status IN (@P0_statuses)]
DEBUG i.r.mssql.ParametrizedMssqlStatement - [cid: 0xa] Start cursored exchange for SELECT COUNT(*) AS cnt FROM FormEvent WHERE Status IN (@P0_statuses) with fetch size 128
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0xa] exchange()
DEBUG io.r2dbc.mssql.QUERY - [cid: 0xa] Executing query: SELECT COUNT(*) AS cnt FROM FormEvent WHERE Status IN (@P0_statuses)
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0xa] exchange(subscribed)
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0xa] Initiating exchange
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0xa] Request: RPCRequest [procName='null', procId=4, optionFlags=io.r2dbc.mssql.message.token.RpcRequest$OptionFlags@6387756e, statusFlags=0, parameterDescriptors=[RpcInt [name='null', value=1073741825], RpcInt [name='null', value=0], RpcInt [name='null', value=4], RpcInt [name='null', value=8193], RpcInt [name='null', value=0], EncodedRpcParameter [name='P0_statuses', value=io.r2dbc.mssql.codec.CharacterEncoder$NvarcharEncoded@6a675284]]]
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0x9] Response: ColumnMetadataToken [columns=[Column [name='", type=MutableTypeInformation [maxLength=4, lengthStrategy=FIXEDLENTYPE, precision=10, displaySize=11, scale=0, flags=32, serverType=int, userType=0, udtTypeName="null", collation=null, charset=null], table=null]]]
DEBUG io.r2dbc.mssql.DefaultMssqlResult - [cid: 0x9] Creating new result
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0x9] Response: io.r2dbc.mssql.message.token.RowToken@122095d5
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0x9] Response: DoneToken [done=true, hasCount=true, rowCount=1, hasMore=false, attnAck=false, currentCommand=0]
DEBUG io.r2dbc.mssql.DefaultMssqlResult - [cid: 0x9] Incoming row count: DoneToken [done=true, hasCount=true, rowCount=1, hasMore=false, attnAck=false, currentCommand=0]
DEBUG io.r2dbc.pool.PooledConnection - Releasing connection
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0x9] Conversation complete
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0xa] Response: ErrorToken [number=8179, state=4, infoClass=16, message='Could not find prepared statement with handle 1073741825.", serverName='a11e255015a3", procName='", lineNumber=16777216]
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0xa] Warning: Code [8179] Severity [GENERAL_ERROR]: Could not find prepared statement with handle 1073741825.
DEBUG io.r2dbc.mssql.DefaultMssqlResult - [cid: 0xa] Creating new result
DEBUG i.r.mssql.util.FluxDiscardOnCancel - received cancel signal
DEBUG io.r2dbc.pool.PooledConnection - Releasing connection
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0xa] Response: ReturnStatus [status=8179]
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0xa] Response: ReturnValue [ordinal=1, parameterName='', value=PooledSlicedByteBuf(ridx: 0, widx: 5, cap: 5/5, unwrapped: PooledUnsafeDirectByteBuf(ridx: 209, widx: 209, cap: 256)), type=MutableTypeInformation [maxLength=4, lengthStrategy=BYTELENTYPE, precision=10, displaySize=11, scale=0, flags=0, serverType=int, userType=0, udtTypeName="null", collation=null, charset=null]]
DEBUG io.r2dbc.mssql.RpcQueryMessageFlow - CursorId: 0
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0xa] Response: ReturnValue [ordinal=4, parameterName='', value=PooledSlicedByteBuf(ridx: 0, widx: 5, cap: 5/5, unwrapped: PooledUnsafeDirectByteBuf(ridx: 209, widx: 209, cap: 256)), type=MutableTypeInformation [maxLength=4, lengthStrategy=BYTELENTYPE, precision=10, displaySize=11, scale=0, flags=0, serverType=int, userType=0, udtTypeName="null", collation=null, charset=null]]
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0xa] Response: DoneProcToken [done=true, hasCount=false, rowCount=0, hasMore=false, attnAck=false, currentCommand=224]
DEBUG i.r.mssql.client.ReactorNettyClient - [cid: 0xa] Conversation complete

from r2dbc-mssql.

mp911de avatar mp911de commented on June 19, 2024

I think there has been a bug for a longer period of time that now gets visible with the changed cursoring behavior. The JDBC driver attempts a re-prepare upon errors 8179 and 586.

This is what we should attempt as well.

from r2dbc-mssql.

mp911de avatar mp911de commented on June 19, 2024

We now attempt a reprepare when encountering a no prepared statement response from the server. Please retry against the latest 1.0.2 snapshots, available from http://oss.sonatype.org/content/repositories/snapshots.

from r2dbc-mssql.

kschlesselmann avatar kschlesselmann commented on June 19, 2024

@mp911de OK, I cannot reproduce the "handle error" any more. Our tests fail with 1.0.2.BUILD-SNAPSHOT nevertheless. The problem seems to have something to do with concurrency though. If I run the failing tests by themselves they run fine. If I run everything in bulk I (for example) end up with

Caused by: io.r2dbc.mssql.ExceptionFactory$MssqlNonTransientException: The parameterized query '(@P0_name nvarchar(4000))SELECT attachment.id, attachment.name, ' expects the parameter '@P0_name', which was not supplied.

for example. Any suggestions what could go wrong here? Again: 1.0.0.RELEASE is fine.

from r2dbc-mssql.

mp911de avatar mp911de commented on June 19, 2024

@kschlesselmann can you please file a new ticket along with a minimal reproducer?

from r2dbc-mssql.

kschlesselmann avatar kschlesselmann commented on June 19, 2024

@mp911de OK. I'm afraid that'll be not so easy but let's see.

from r2dbc-mssql.

stephanpelikan avatar stephanpelikan commented on June 19, 2024

I have this issue as mentioned in #248 (comment). With the latest SNAPSHOT in use the error is gone.

from r2dbc-mssql.

sebastian-alfers avatar sebastian-alfers commented on June 19, 2024

I see a similar "Connection closed" exception (sometimes). Running version 1.0.2.RELEASE and disabled cursored execution.

from r2dbc-mssql.

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.