letsencrypt / boulder

An ACME-based certificate authority, written in Go.
Mozilla Public License 2.0
5.2k stars 606 forks source link

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

Open aarongable opened 1 month ago

aarongable commented 1 month ago

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 commented 1 month ago

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

aarongable commented 1 month ago

Step 1 here is:

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.