Skip to content

version 2.5.6 not able to handle database url's with a trailing . #1381

@parkerirving45

Description

@parkerirving45

Describe the bug

The previous version of the driver 2.3.5 was able to properly handle a trailing . Now the hostSpec is different https://github.com/aws/aws-advanced-jdbc-wrapper/blob/main/wrapper/src/main/java/s[…]on/jdbc/plugin/readwritesplitting/ReadWriteSplittingPlugin.java
with the older version of the driver, the hostSpec is the same whether or not the is a trailing . --> the trailing . seems to be parsed away
with the newer version of the driver, the hostSpecs are different --> the trailing . isn't parsed away (which I think is what causes issues)

Expected Behavior

I expected the hostSpec to be the same whether or not there is a trailing .

What plugins are used? What other connection properties were set?

readwritesplitting

Current Behavior

It is unable to establish a connection to the reader instance when there is a trailing . and instead sends all traffic to the writer.

Reproduction Steps

Configure your database url with a trailing . at the end and then try to connect to a reader instance of that database using the readwritesplitting plugin.

Possible Solution

Change how the host is parsed to ignore trailing .

Additional Information/Context

No response

The AWS Advanced JDBC Driver version used

2.5.6

JDK version used

11

Operating System and version

OSX

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpending releaseResolution implemented, pending official release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions