pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: kneeraj (@kneeraj) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] PR #3409: feat: add support for plugging in custom HostChooser
Date: Fri, 08 Nov 2024 04:56:14 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
> Thank you for the draft, and sorry for the delay with the review. In general, it looks like a good start.
>
> However, it looks like `GlobalHostStatusTracker` duplicates the logic of `registerFailure` and `registerSuccess`, so I would like to make the current host chooser a plugin, so should not rely on `GlobalHostStatusTracker.reportHostStatus` from `ConnectionFactoryImpl`. In other words, currently the PR suggests a set of new APIs, however, it is not clear if the old balancer could be implemented as an external plugin that uses the new APIs only.
>
> What do you think?
Thank you for starting the review @vlsi .
I see your point about duplicating the logic. If I understand correctly the current hostchoosers i.e SingleHostChooser and MultiHostChooser should track the host status through `register*` methods only and the GlobalHostStatusTracker's majority logic should go inside these two inbuilt HostChoosers.
Let me know if I have understood correctly and if I should try to refactor accordingly.
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: github://pgjdbc/pgjdbc
Cc: [email protected], [email protected]
Subject: Re: [pgjdbc/pgjdbc] PR #3409: feat: add support for plugging in custom HostChooser
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox