Skip to content

codeintel: Store commits as bytea in lsif_nearest_uploads

Administrator requested to merge ef/compact-commits into main

Created by: efritz

The lsif_nearest_uploads table has a row for every commit of a repository that it knows about. This can be massive, and is about half the size of the production database currently. We can do better by storing the integer value of the commit encoded as a variable-length byte (4 byte overhead). This should reduce the size required by this table by about half.

Edit: New column is nullable, old column will be written/read for the future. Will have another update that will stop writing the old column, and a subsequent one to remove it completely. Not sure the timeline here, but I'm assuming this will only be problematic for customers with many, many repos with LISF data.

Merge request reports

Loading