Skip to content

Alert admins if LSIF uploads are too large for DBS_DIR_MAXIMUM_SIZE_BYTES

Created by: dadlerj

Reported by https://app.hubspot.com/contacts/2762526/company/2931649618

A user reported that their LSIF uploads page seemed to be oddly empty — a bunch of uploads processing, but zero "current" uploads appearing.

After reading our docs (and first being confused by https://github.com/sourcegraph/sourcegraph/issues/9987) he realized that disk space could be the problem:

ok i'd guess we have to up ours, because we've enabled lsif on a separate repository, and uncompressed, our lsif is 7.2G

so i'm guessing the decompression of a new lsif kicks the recently processed lsif out

So basically every successful upload would cause the previous one to be evicted.

I know we don't have (as far as I know) any way to expose asynchronous errors to site admins, but this seems like a good use case for it. Perhaps in the meantime simply returning an error or warning from the LSIF upload endpoint if the compressed upload exceeds some percentage (e.g. 10%?) of the current DBS_DIR_MAXIMUM_SIZE_BYTES?