Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable enforcing coordinator for request #1031

Open
wprzytula opened this issue Jul 9, 2024 · 3 comments
Open

Enable enforcing coordinator for request #1031

wprzytula opened this issue Jul 9, 2024 · 3 comments
Labels

Comments

@wprzytula
Copy link
Collaborator

Motivation

cpp-driver provides an option to explicitly set a node to be coordinator for a specific request. It argues for that option this way:

In general, this should not be used, but it can be useful in the following situations:

  • To query node-local tables such as system and virtual tables.
  • To apply a sequence of schema changes where it makes sense for all the changes to be applied on a single node.

Solution

Let's expose a setter for explicit coordinator - consider identifying by address or host_id.
If an explicit coordinator is set for a statement, then:

  • load balancing policy shall be ignored,
  • speculative execution shall be disabled,
  • retries shall be only performed on the same node (consider if RetryNextNode decisions should be then changed into RetrySameNode or into DontRetry).
@wprzytula
Copy link
Collaborator Author

This should be in line with #738 requirements about enforcing a particular coordinator.

@wprzytula wprzytula added area/load-balancing cpp-rust-driver-p1 Functionality required by cpp-rust-driver labels Jul 9, 2024
@wprzytula wprzytula added this to the 0.15.0 milestone Jul 9, 2024
@Lorak-mmk
Copy link
Collaborator

This can already be done by setting a custom LBP on the query, which yields only 1 element.

@wprzytula
Copy link
Collaborator Author

This can already be done by setting a custom LBP on the query, which yields only 1 element.

Yes, it can be done, but it's fairly inconvenient. The driver's duty is to provide convenient and shorthands to operate with Scylla, and by cpp-driver's documentation (see Motivation) the shorthand for setting an explicit coordinator for a statement is useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants