Skip to content

DRAFT: Host Failover Multiplexed - #3098

Closed
mintsoft wants to merge 829 commits into
npgsql:mainfrom
mintsoft:failover-advanced-multiplexed
Closed

mintsoft wants to merge 829 commits into
npgsql:mainfrom
mintsoft:failover-advanced-multiplexed

Conversation

@mintsoft

@mintsoft mintsoft commented Aug 2, 2020 •

Copy link
Copy Markdown
Contributor

Replaces: https://github.com/npgsql/npgsql/pull/2778/files

OK:

  • I've extended the connectionString mechanism to include the TargetServerType
  • I'm doing all my testing currently with both Pooling and Multiplexing disabled; once this works I'll start working on that side.
  • The npgsqlConnector now detects the type of server it's connected to (it'll need this for selection)
  • The KeepAlive mechanism I've replaced with something that is updating the "Primary/Secondary" status of a connector
  • The closing and reopening has been isolated to the Connector for now and I've reused the Host property of the connector; this means that there a subtle change from being "showing what is configured in the connectionstring" to "showing which host it has actually connected to"

Outstanding things to implement:

  1. Update connection pooling so that it is ServerType aware, when connections are returned to the pool they need to be put into the right 'bucket' as to whether they are Primary or Secondary
  2. Decide how to handle server promotion/demotion in non-pooled cases

Suggested improvements for the next version:

  1. I'd like the connections to multiple hosts to actually happen in parallel so we don't have to incur the ConnectionTimeout cost when the first host in the CSV is completely inaccessible

roji and others added 30 commits August 15, 2019 04:30
For 4.1.0-preview1 release, although many other unrelated updates weren't in sync.
Parameters were previously being logged from the NpgsqlCommand, but
they should be logged from each NpgsqlStatement separately.

Fixes #2424

(cherry picked from commit fb39cf5)
Fix #2562 by removing the constraint of listing indexes in the current search path
(cherry picked from commit ea74c7d)
Removal of breaking changes from 4.1 release.

This reverts commit 8247423.
Removal of breaking changes from 4.1 release.

This reverts commit 9154ce8.
Removal of breaking changes from 4.1 release.

This reverts commit 9deeb37.
Removal of breaking changes from 4.1 release.

This reverts commit 929fb41.
(cherry picked from commit 5d992bd)
RowDescription gets reused, but needs to be cloned when auto-preparing.

But was introduced in 4.1.0, commit 94abc99,
which handled cloning for explicit prepare but not auto-prepare.

Fixes #2644

(cherry picked from commit 44ffb8f)
* Revert NpgsqlStatement.Rows from ulong back to uint (#2150)
* Revert NpgsqlBinaryImporterComplete to return void (#2112)
* Moved NpgsqlTimeout from namespace Npgsql.Util back to Npgsql
* Various other minor missing cancellation token overloads

Fixes #2626
Fixes #2655
Fixes #2642
Our SQL query parser supports an ancient "non-conforming string" mode
from pre PG 9.1. Unfortunately, commit
f1bf198 introduced a bug where we
erroneously went into this mode.

Fixes #2660

(cherry picked from commit 239a919)
(cherry picked from commit d387e52)
* Follow VSIX project template.
* No more packages.config, only <PackageReference>
* Simple <ProjectReference> to Npgsql brings in all additional
  dependencies.

Fixes #2670

(cherry picked from commit 3d13d70)
(cherry picked from commit e4ad6df)
Fixes #2703

(cherry picked from commit 7a830c5)
vonzshik and others added 26 commits December 9, 2020 13:23
Our unconditional use of the Connector property in
ReplicationConnection.DisposeAsync() led to a stack overflow led to a
stack overflow when the connector was not initialized (e.g. disposing
the connection without successfully opening it before).
These will all fail until I've implemented it
…t the keepalive mechanism to update our view of what we're connected to
… connection to the wrong type (i.e. a secondary when we want a primary) as a connection "failure" and retry against the next server in the the Host collection
…ctionString

I think we're going to need to extend this with ServerType as well as it can change dynamically.
@mintsoft

Copy link
Copy Markdown
Contributor Author

I'm going to bomb this out and start with a fresh history, I've been gitted.

@mintsoft mintsoft closed this Dec 31, 2020
@mintsoft
mintsoft deleted the failover-advanced-multiplexed branch December 31, 2020 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.