Page MenuHomePhabricator

Increase the storage size for commit summaries
ClosedPublic

Authored by epriestley on Aug 10 2016, 4:52 PM.
Tags
None
Referenced Files
F13085299: D16385.diff
Wed, Apr 24, 11:46 PM
Unknown Object (File)
Thu, Apr 11, 8:01 AM
Unknown Object (File)
Sun, Apr 7, 7:56 AM
Unknown Object (File)
Wed, Apr 3, 10:13 AM
Unknown Object (File)
Mar 5 2024, 3:10 AM
Unknown Object (File)
Feb 19 2024, 2:57 PM
Unknown Object (File)
Feb 10 2024, 9:28 AM
Unknown Object (File)
Jan 24 2024, 4:46 PM
Subscribers

Details

Summary

Fixes T11453. Currently, commit message summaries are limited to 80 bytes. This may only be 20-40 characters for CJK languages or langauges with Cyrillic script.

Increase storage size to 255, then truncate to the shorter of 255 bytes or 80 glyphs. This preserves the same behavior for latin languages, but is less tight for Russian, etc.

Some minor additional changes:

  • Provide a way to ask "how much data fits in this column?" so we don't have to duplicate column lengths across summary checks or UI errors like "title too long".
  • Remove the text80 datatype, since no other columns use it and we have no use cases (or likely use cases) for it.
Test Plan
  • Made a commit with a Cyrillic title, saw reasonable summarization in UI:

Screen Shot 2016-08-10 at 9.46.01 AM.png (182×1 px, 29 KB)

  • Added and ran unit tests.
  • Grepped for removed SUMMARY_MAX_LENGTH constant.
  • Grepped for removed text80 data type.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Increase the storage size for commit summaries.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
avivey added a reviewer: avivey.
avivey added a subscriber: avivey.

nice!
Any guesses how expensive the migration would be?

This revision is now accepted and ready to land.Aug 10 2016, 5:48 PM

I'll have an actual number for this install once this deploys, but we've seen like >10x variance for similar data sizes in the past so I've pretty much given up trying to guess. These are usually pretty cheap, though, and the table isn't that big (usually only millions of rows even for large installs). I'd guess no more than a few minutes in the worst case?

This revision was automatically updated to reflect the committed changes.