Migrating code intelligence data from LSIF to SCIP (Sourcegraph 4.5 -> 4.6)
Sourcegraph 4.5 introduced an out-of-band migration that re-encodes LSIF code intelligence data as SCIP in the
codeintel-db. This migration is required to complete prior to a subsequent upgrade to 4.6, as support for reading LSIF-encoded data has been removed as of this version.
As of src-cli 4.5, LSIF indexes will be converted to SCIP prior to upload. This ensures that only existing data needs to be migrated in the background. Using an older version of src-cli to upload code intelligence to your index may continue to feed additional LSIF data that needs to be subsequently migrated. This will ultimately block the ability to upgrade to the next version as the migration will never reach 100% (and remain there).
Once the migration has completed, Postgres may continue to hold on to disk space that was previously occupied by LSIF data. Future versions of Sourcegraph will drop these tables completely, freeing this space. Heavier users of precise code intelligence may wish to reclaim this disk space earlier. Once the migration is complete, you can truncate the LSIF data tables to immediately reclaim this space.
If you wish to take the scorched earth route and clear all existing code intelligence data from your instance and start fresh, follow the entire guide on clearing code intelligence data.