Skip to content

Mixed up statements when pool is enabled #273

Open
@stephanpelikan

Description

@stephanpelikan

Bug Report

On activating the connection pool

spring:
  r2dbc:
    ....
    pool:
      enabled: true
      max-idle-time: PT9M
      max-life-time: PT1H
      initial-size: 1

parameters of statements are mixed up! I get errors regarding parameter binding which belong to other statements.

Versions

  • Driver: current SNAPSHOT build from main (point currently to 7d5b08b)
  • Database: 15.00.2101
  • Java: 17
  • OS: Docker image azul/azul-openjdk-alpine:17-latest

Current Behavior

There is one statement having 3 parameters documentTypes, lowerBound and upperBound which gives me the error

...
WHERE document.LastModified BETWEEN :lowerBound AND :upperBound
]; Procedure or function  has too many arguments specified.

And there is another statement having 2 parameters documentPk and projectPk which gives me this error:

...
]; The parameterized query '(@P0_documentTypes nvarchar(4000),@P1_documentTypes nvarchar(400' expects the parameter '@P0_documentTypes', which was not supplied.
        at org.springframework.r2dbc.connection.ConnectionFactoryUtils.convertR2dbcException(ConnectionFactoryUtils.java:246) ~[spring-r2dbc-6.0.8.jar!/:6.0.8]

On disabling the pool everything is fine.

This only happens in our test environment (Azure-Cloud). On my local Linux client everthing was fine also with using the pool.

Steps to reproduce

Unfortunately, don't know. This only happens in our Azure AKS environment.

Expected behavior/code

Same behavior as without activated pool ;-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions