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

RUBY-3620 - Sessions should ignore "cluster mismatched" validation and execute commands on other clusters #2918

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

johnnyshields
Copy link
Contributor

@johnnyshields johnnyshields commented Feb 11, 2025

As per RUBY-3620, when using a Session transaction, currently, it is impossible to execute any command on any other cluster. This is a big problem if you have model callbacks which are cross-cluster--your app fails and there's nothing you can do about it 🤦‍♂️

At a minimum, it is better to allow cross-cluster commands to execute within transactions, i.e. on a separate session for that cluster.

In the future (not in this PR), we could allow:

  • Separate sessions/transactions per cluster, potentially overlapping.
  • A mode which gives a warning when executing cross-cluster on a transaction (I would want a way to silence such a warning by default.)

Note that this PR introduces/extracts out SessionClusterMismatched error (base class SessionInvalid)

@johnnyshields johnnyshields changed the title Skip cluster mismatched error; allow queries on other clusters to execute without error RUBY-3620 - Skip cluster mismatched error Feb 11, 2025
@johnnyshields johnnyshields changed the title RUBY-3620 - Skip cluster mismatched error RUBY-3620 - Sessions should ignore "cluster mismatched" validation and execute commands on other clusters. Feb 11, 2025
@johnnyshields johnnyshields changed the title RUBY-3620 - Sessions should ignore "cluster mismatched" validation and execute commands on other clusters. RUBY-3620 - Sessions should ignore "cluster mismatched" validation and execute commands on other clusters Feb 11, 2025
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.

1 participant