← 输入框|github.com|刷新
Skip to content

Should not mark a connection as invalid after exception #274

Open

Description

@knuclechan

At com.github.jasync.sql.db.pool.ConnectionFactory#validate(), it will mark the connection as invalid after exception like sql syntax error or duplicate key. But the connection is still valid to use. I think only network/connection error should invalidate a connection

Activity

  1. github-actions commented on Dec 3, 2021

    @github-actions

    Thank you for reporting an issue. See the wiki for documentation and gitter for questions.

  2. oshai commented on Dec 5, 2021

    @oshai
    Contributor

    IIRC the reason to do that is to avoid cases of buffers not getting cleaned and some edge cases. I think it's better to play it on the safe side on this case.
    Do you see any implications with the current approach?
    Perhaps we can "white-list" some errors that will not invalidate the connection (like the ones you mentioned above) by adding test cases for those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions