Skip to content

bugfix: Reduce the batch writer's batch size.#1512

Merged
jcscottiii merged 1 commit into
mainfrom
jcscottiii/features-process-fix
May 20, 2025
Merged

bugfix: Reduce the batch writer's batch size.#1512
jcscottiii merged 1 commit into
mainfrom
jcscottiii/features-process-fix

Conversation

@jcscottiii
Copy link
Copy Markdown
Collaborator

The web features job is currently failing

Currently, I see this error:

ERROR invalid status while batch writing status="rpc error: code = InvalidArgument desc = The transaction contains too many mutations. Insert and update operations count with the multiplicity of the number of columns they affect. For example, inserting values into one key column and four non-key columns count as five mutations total for the insert. Delete and delete range operations count as one mutation regardless of the number of columns affected. The total mutation count includes any changes to indexes that the transaction generates. Please reduce the number of writes, or use fewer indexes. (Maximum number: 80000)"

You'll see that a transaction can actually count multiple times if there things like an index. So I just reduced the batchSize down to something that works. (Tested in on staging)

Other changes:

  • My IDE highlighted an optimization on the looping for the concurrent batch size writer. So I just used the auto-fix for that.

The web features job is currently failing

Currently, I see this error:

```
ERROR invalid status while batch writing status="rpc error: code = InvalidArgument desc = The transaction contains too many mutations. Insert and update operations count with the multiplicity of the number of columns they affect. For example, inserting values into one key column and four non-key columns count as five mutations total for the insert. Delete and delete range operations count as one mutation regardless of the number of columns affected. The total mutation count includes any changes to indexes that the transaction generates. Please reduce the number of writes, or use fewer indexes. (Maximum number: 80000)"
```

You'll see that a transaction can actually count multiple times if there things like an index. So I just reduced the batchSize down to something that works. (Tested in on [staging](https://pantheon.corp.google.com/run/jobs/details/europe-west1/staging-europe-west1-web-features/executions?inv=1&invt=Abx65w&project=webstatus-dev-internal-staging))

Other changes:
- My IDE highlighted an optimization on the looping for the concurrent batch size writer. So I just used the auto-fix for that.
@jcscottiii jcscottiii added this pull request to the merge queue May 20, 2025
Merged via the queue into main with commit 724e1aa May 20, 2025
7 checks passed
@jcscottiii jcscottiii deleted the jcscottiii/features-process-fix branch May 20, 2025 20:21
@jstenback jstenback mentioned this pull request Jun 5, 2025
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

Successfully merging this pull request may close these issues.

2 participants