Batch commit causes INVALID_ARGUMENT The transaction exceeds the maximum total bytes-size
(From the original https://github.com/mozilla-services/syncstorage-rs/issues/1031)
Sentry event: https://mozilla.sentry.io/issues/4700544013/events/c91e25b686d449a890b2efb951113200/
"A database error occurred: RpcFailure: 3-INVALID_ARGUMENT The transaction exceeds the maximum total bytes-size that can be handled by Spanner. Please reduce the size or number of the writes, or use fewer indexes. (Maximum size: 104857600)"
This seems to have begun happening on prod as of 0.9.1. Like #1026, it may have not occurred in the past because #882 may have occurred instead (and resolving it finally allows it to happen instead). Unlike #1026 it's so far specific to Fenix.
We do count the sizes of POST'd data but as suggested by this comment we're likely not counting the total size of a batch (which would require hitting the database or some alternative).
Some investigation needed here:
- What did the python syncstorage do in this situation?
- Is this specific to Fenix and if so why?
- Might we just detect this specific error from Spanner and propagate it to the client as a validation error instead of what happens now, a 5xx
┆Issue is synchronized with this Jira Bug