Skip to content

FIx multiple hosts with disabled sql rewriting#5056

Merged
vonzshik merged 2 commits intomainfrom
5055-multiple-hosts-with-disabled-sql-rewriting-fix
May 12, 2023
Merged

FIx multiple hosts with disabled sql rewriting#5056
vonzshik merged 2 commits intomainfrom
5055-multiple-hosts-with-disabled-sql-rewriting-fix

Conversation

@vonzshik
Copy link
Copy Markdown
Contributor

Fixes #5055

@vonzshik vonzshik requested a review from roji as a code owner May 11, 2023 20:32
public async Task Multiple_hosts_with_disabled_sql_rewriting()
{
using var _ = DisableSqlRewriting();
PoolManager.Reset();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: we could move this into DisableSqlRewriting

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure, just was thinking that having this in MultipleHostsTests is a bit more appropriate.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah, you mean to move PoolManager.Reset?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sure. Was just saying that we probably want to clear the pool wherever we have a test doing such a global change etc.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK, can do. The only reason I added PoolManager.Reset is because I copy-pasted from IntegrationTest above (it was required because we were caching cluster's state globally, and now it's probably not needed anymore).

@vonzshik vonzshik enabled auto-merge (squash) May 12, 2023 09:22
@vonzshik vonzshik merged commit e4c0d3f into main May 12, 2023
@vonzshik vonzshik deleted the 5055-multiple-hosts-with-disabled-sql-rewriting-fix branch May 12, 2023 09:32
vonzshik added a commit that referenced this pull request May 12, 2023
vonzshik added a commit that referenced this pull request May 12, 2023
@vonzshik
Copy link
Copy Markdown
Contributor Author

Backported to 7.0.6 via 10a23e2, 6.0.10 via a0fb85a

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.

MultiHostDataSource fails on connect when EnableSqlRewriting is set to false

2 participants