Skip to content

Conversation

@roji
Copy link
Member

@roji roji commented Jun 22, 2022

Closes #4321

@roji roji force-pushed the DataSource/MultiHost branch from e88d3dd to b82f2c6 Compare June 22, 2022 09:47
@roji roji force-pushed the DataSource/MultiHost branch from b82f2c6 to 463e9e0 Compare July 4, 2022 08:23
@roji roji marked this pull request as ready for review July 4, 2022 08:23
@roji roji requested a review from vonzshik as a code owner July 4, 2022 08:23
Copy link
Member

@NinoFloris NinoFloris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionally it looks great, I'll leave the architectural concerns, which I share to some extent, to @vonzshik

/// <summary>
/// Builds and returns a <see cref="NpgsqlMultiHostDataSource" /> which is ready for use for load-balancing and failover scenarios.
/// </summary>
public NpgsqlMultiHostDataSource BuildMultiHost()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could/should? this be an extension method?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason? It's all built-in support, I don't anticipate us introducing many other types of data source types etc.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's why it's a double question.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's OK... And we usually don't care about binary compat that much that we couldn't change it to an extension in a major version if we really wanted to...

@roji roji force-pushed the DataSource/MultiHost branch from f526272 to 9daf2bd Compare July 4, 2022 17:26
@roji roji enabled auto-merge (squash) July 4, 2022 17:27
@roji roji merged commit 3d41e7b into npgsql:main Jul 4, 2022
@roji roji deleted the DataSource/MultiHost branch July 4, 2022 17:34
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.

DbDataSource and multiple hosts

2 participants