Skip to content

What behaviour for creator when no connection can be created? #55

@telukwg

Description

@telukwg

Hi, I am using DBUtils (perhaps incorrectly) to handle client-managed server failover for a database cluster (ie. the client must select a new DB host when the current host has become unresponsive/failed-in-some-way.)

I have a scenario where there are potentially, no working hosts left in the cluster, and I want to code my creator function correctly so that DBUtils responds most correctly.

So - when I have run out of working hosts - should I have my creator function raise an Exception in this case? Should it be any particular Exception? (ie. one listed in the "failures" pool argument, one specifically NOT in the "failures".) Should I just return a "None"? (*I'm guessing not - my test code resulted in connection object after calling "pool.connection()".

I am using v3.11 of DBUtils, and the PooledDB type.

Thank-you and regards, Bill.

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