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

Remove use of MultiInserter's "RETURNING" functionality #7718

Open
aarongable opened this issue Sep 23, 2024 · 2 comments
Open

Remove use of MultiInserter's "RETURNING" functionality #7718

aarongable opened this issue Sep 23, 2024 · 2 comments
Assignees

Comments

@aarongable
Copy link
Contributor

This doesn't work in MySQL, so we need to remove it before we migrate.

We may want to replace it with random ID generation rather than auto-increment, if we're worried about the efficiency of inserting 100 rows for a maximally-sized newOrder request.

@jcjones
Copy link
Contributor

jcjones commented Sep 23, 2024

Note that replacing the Auto-Increment behavior will break the current partition management scheme.

@aarongable
Copy link
Contributor Author

Step 1 here is:

  • Add a feature flag to control this behavior
  • Behind that flag, replace multi-inserter with a bunch of (parallel) single inserts
  • Use the SA's existing "parallelismPerRPC" config to control the parallelism here

We also probably want to reduce the configured parallelism per RPC, as we believe that may have been a contributing factor in the SA<->ProxySQL connection churn we've historically had problems with.

From there, we can flip the flag in staging/prod, and easily turn it off if it causes problems. If it doesn't cause problems, we're good here -- if it does cause problems, we can dive into batch inserts, random ID generation, and all the knock-on effects of that.

@aarongable aarongable added this to the Sprint 2024-09-24 milestone Sep 24, 2024
@aarongable aarongable self-assigned this Oct 1, 2024
aarongable added a commit that referenced this issue Oct 4, 2024
…thzs (#7739)

This is our only use of MariaDB's "INSERT ... RETURNING" syntax, which
does not exist in MySQL and Vitess. Add a feature flag which removes our
use of this feature, so that we can easily disable it and then re-enable
it if it turns out to be too much of a performance hit.

Also add a benchmark showing that the serial-insertion approach is
slower, but perhaps not debilitatingly so.

Part of #7718
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

3 participants