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

Prevent concurrent use of a single session id #1

Closed
mattrobenolt opened this issue Nov 9, 2023 · 0 comments
Closed

Prevent concurrent use of a single session id #1

mattrobenolt opened this issue Nov 9, 2023 · 0 comments

Comments

@mattrobenolt
Copy link
Owner

Right now, we attempt to share the same connection, which results in an error.

This is a mistake by the user/driver/whatever and this behavior on PlanetScale becomes nondeterministic. PlanetScale ultimately serializes these parallel requests against the underlying mysqld in some capacity, but the order and behavior becomes nondeterministic.

In here, it makes sense to me, that instead of serializing these into our mysqld, we can use this opportunity to actually prevent it and return an error that more suggests that the behavior is wrong.

While this differs from what PlanetScale does, I think that's a useful deviation from our implementation especially if the intention is to use a tool like this for local dev or in CI environments, we'd like to surface this incorrect behavior as a useful error rather than still "allowing" it with our own nondeterministic behavior.

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

No branches or pull requests

1 participant