Fixes to multi-host data source support#4591
Merged
roji merged 1 commit intonpgsql:mainfrom Nov 1, 2022
Merged
Conversation
dd4493a to
213f741
Compare
Member
Author
|
@NinoFloris @vonzshik the test issues are fixed, this is ready for reviewing. FYI I tried to look at the naming discussion agin, around NpgsqlMultiHostDatasource.For. I tried to rename to e.g. WithTargetSessionAttributes(), but that means the typical API invocation would look like this: var x = dataSource.WithTargetSessionAttributes(TargetSessionAttributes.Primary);... which seems really needlessly repetitive and long (the argument is very likely to be an enum literal, which makes things very explicit). So for now I still think that although |
vonzshik
approved these changes
Oct 20, 2022
Contributor
vonzshik
left a comment
There was a problem hiding this comment.
Seems OK, though there seems to be an issue with one of the tests.
213f741 to
b6a4462
Compare
b6a4462 to
5d56c72
Compare
* Allow BuildMultiHost with one host and Build with multple. * Add AddNpgsqlMultiHostDatasource to Npgsql.DependencyInjection. * All tests which use pg_terminate_backend are now marked as NonParallelizable and reset the cluster state cache, to prevent interference with multihost tests. Closes npgsql#4578
5d56c72 to
c291e48
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4578