HomePhabricator

Truncate object fields in Herald transcripts

Description

Truncate object fields in Herald transcripts

Summary:
A few users have hit cases where Herald transcripts of large commits exceed the MySQL packet limit, because one of the fields in the transcript is an enomrous textual diff.

There's no value in saving these huge amounts of data. Transcripts are useful for understanding the action of Herald rules, but can be reconstructed later. Instead of saving all of the data, limit each field to 4KB of data.

For strings, we just truncate at 4KB. For arrays, we truncate after 4KB of values.

Test Plan: Ran unit tests. Artificially decreased limit and ran transcripts, saw them truncate properly.

Reviewers: btrahan

Reviewed By: btrahan

CC: frgtn, aran

Differential Revision: https://secure.phabricator.com/D7783

Details

Provenance
epriestleyAuthored on Dec 18 2013, 7:59 PM
epriestleyPushed on Dec 18 2013, 7:59 PM
Reviewer
btrahan
Differential Revision
D7783: Truncate object fields in Herald transcripts
Parents
rPb0f7e7a6af2d: Work around `hg` echoing warnings to stdout under --debug
Branches
Unknown
Tags
Unknown

Event Timeline