Merge pull request #35571 from overleaf/mg-increase-max-string-size

Bump backend OT/history processing limit (MAX_STRING_LENGTH) to 3MB

GitOrigin-RevId: ed64fe5522c45b1ace221a01daa2ae70939816f9
This commit is contained in:
Malik Glossop
2026-09-17 11:35:54 +00:00
committed by Copybot
parent cca0f9b518
commit 73068f10ee
2 changed files with 10 additions and 1 deletions
@@ -45,9 +45,13 @@ class TextOperation extends EditOperation {
/**
* Length of the longest file that we'll attempt to edit, in characters.
*
* Backend OT/history processing limit. Incoming uploads/edits are separately
* capped at 2MB via `max_doc_length`; this higher ceiling lets legacy updates
* with larger OT results flow through history instead of throwing TooLongError.
*
* @type {number}
*/
static MAX_STRING_LENGTH = 2 * Math.pow(1024, 2)
static MAX_STRING_LENGTH = 3 * Math.pow(1024, 2)
static UnprocessableError = UnprocessableError
static ApplyError = ApplyError
static InvalidInsertionError = InvalidInsertionError