Skip to content

chore: update the async initial strategy plugin - #1264

Open
karenc-bq wants to merge 1 commit into
mainfrom
chore/initial-strategy-plugin-async
Open

chore: update the async initial strategy plugin#1264
karenc-bq wants to merge 1 commit into
mainfrom
chore/initial-strategy-plugin-async

Conversation

@karenc-bq

Copy link
Copy Markdown
Contributor

Description

Update the async initial strategy plugin

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.


Setting a value outside the valid set for the given endpoint raises an error.

> **Note:** `endpoint_substitution_role=any` is accepted only for a custom cluster endpoint, but host selection for the `any` role is not currently supported — it raises an unsupported-strategy error at connect time. Use `reader` or `none` for custom cluster endpoints.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I find this note to be quite confusing - it doesn't match the table and it seems to me that any is not supported

InstanceSubstitutionStrategy.SUBSTITUTE_WITH_ANY)

svc.get_host_info_by_strategy.assert_not_called()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change

I think this needs a second line

async def _get_verified_reader(
raise

return await connect_func()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just to double check: if we time out - we default back to connect_func() ? I believe we raise an error in the sync version. You might just want to document this change if it is intended. Some consequences are: if we set verify role it will retry for the whole time and if it can't connect to the right role it will still return a wrong role after trying until timeout

Base automatically changed from chore/initial-strategy-plugin to main August 6, 2026 01:25
@karenc-bq
karenc-bq force-pushed the chore/initial-strategy-plugin-async branch from 30ea80a to 16070b5 Compare August 6, 2026 01:25
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.

2 participants