Skip to content

insights: commit index has duplicate revisions across different repos

Created by: coury-clark

While debugging an issue with a Code Insight, I ran across a problem where the commit index had some duplicate revisions across multiple repositories. In all of the duplicates they were paired (repository X, Y shared a revision). I observed this both locally and on k8s-dogfood.

The result was a search that was queued with a revision that did not exist in the repository, and a broken insight. Slack thread

I resolved this by regenerating the index, but we need to understand the root cause and fix this (and likely regenerate all customer indices). Some possible ideas:

  1. Somehow gitserver has a bug and is returning bad data
  2. Something is getting cached in the indexer and writing the revision to the wrong repository