Repository navigation
Support Multiple hosts in connection string - #1764
higuchi-daisuke wants to merge 10 commits into
Conversation
5151389 to
8d35b8a
Compare
|
I did some refactoring. Especially, multiple hosts tests are not run as default. |
349e870 to
0fcf927
Compare
fe46200 to
1f156c8
Compare
|
Any news? Me also very interesting in these feature. |
|
I'm sorry I don't have more time at the moment to look into this feature. I think we can (and should) definitely have multiple hosts support in the next release, but I'm involved in an intensive project that won't leave much time before end of October. Just to set everyone's expectations... Having said that, I'll try to find a weekend soon to at least review this, comment on the general direction etc. |
|
What is the status of this feature, besides having a few conflicts? Has this pull request been tested? I would love to see this feature and would like to contribute. |
|
No, unfortunately we had no time to properly review this PR at any point. We've just recently released Npgsql 4.1 and are stabilizing it, I do plan for this feature to make it in for the next minor/major version. |
|
Do you know the release date (or season) for the next major version of Npgsql? |
|
Sorry that this has been continuously pushed back @ayaiwt. I'm very interested in seeing this feature merged, but just haven't found the time. I'm not sure when we'll next release, but it's definitely at least a few months away. I'm planning some pretty major architecture work in the near future which may make a mess of things (for multiplexing/pipelining), although that should hopefully not conflict too much with what this PR touches. It's really up to you, based on when you have spare time. If you can find time to rebase this, I can promise to review and push it in to the best of my ability. |
|
@roji Thank you for your kindness. |
|
@ayaiwt it so happens that after next week I may have some more time to devote to this. So this could be a good time to do the rebase and for us to do some back-and-forths on this work to finally get it in. |
|
@higuchi-daisuke I was about to start testing this in our dev environment to get some useful feedback, however I'm fighting a little with the merge. Is there any chance you could rebase? :) |
|
@higuchi-daisuke I've just been testing this against the https://github.com/higuchi-daisuke/npgsql/tree/multiplehosts branch as it stands without any rebasing and it generally seems to work :) However I've noticed that the connection-pool gets "stuck" on same host. So in the following scenario: But then also every query gets this: Which isn't the behaviour I was expecting; it seems like this is then broken until the application is recycled. I'll do some more digging to confirm the exact behaviour, possibly this is being influenced by I've got my test-application here for now: https://github.com/mintsoft/npgsqlTester if you'd like to see it |
|
I've been trying to get this rebased so I can have an attack at the fail-conditions of one of the servers in the connection pool and I've come basically come unstuck on the The new lockless mechanism is completely differently architected compared to the old one and I can't see an easy seam to slice into. I'm thinking that the easiest option might be to make every multi-host connectionstring expand out into Thoughts @roji / @higuchi-daisuke ? |
|
@mintsoft I haven't yet looked at this PR at any point. However, in my mind:
Note that I haven't really thought anything through (or looked at this PR!) so I may be missing lots of context etc. - please feel free to challenge me :) |
|
@roji Interesting, that's not quite how it's implemented as it stands, basically there's a reasonable amount of logic in PoolManager to make it work. I think rather than trying to rebase that in, I'll take a stab at working that logic out and seperating the PoolManager vs the multi-host/failover parts a little and see what it looks like. |
|
I'm sorry I don't have time to look into the PR in its current state. If it looks like there's any advantage in implementing things in the pool, please don't hesitate to let me know and we'll discuss the design. |
|
@higuchi-daisuke @ayaiwt and others, I'm really sorry this hasn't received the proper attention... This is a pretty big feature that's complex to review and bring to a mergeable state. @mintsoft is working on this via #2778, presumably based on the ideas already explored here. In any case, I'm going to go ahead and close this for age, especially as the pool implementation has been rewritten from the ground up. On the upside, now that this rewrite has happened, it may be a good moment to attack this again, as a lot of lock-free complexity has been removed. |
Hi,
I'm interested in multiple hosts feature (#732 and #1710). I tested PostgreSQL 10's this feature before.
So, I modified @ayaiwt 's codes. ayaiwt allowed me to change the codes.
External specification is not changed except for parameter name.
I created the test code. However, please tell me if you have any good idea to implement the test for this feature. Because this feature needs multiple hosts, so I could not use current interface.
Implementation summary
Especially, I want to discuss with exception handling.
Regards,
Daisuke, Higuchi