Skip to content

search: config fingerprint to reduce work done by zoekt polling

Administrator requested to merge k/config-fingerprint into main

Created by: keegancsmith

configFingerprint is an opaque structure used by Sourcegraph to minimize the amount of work done when zoekt polls for repository options. It is a timestamp and a hash of the configuration. Using these two bits of information, we can heuristically calculate what has changed since the fingerprint.

We version the fingerprint format since we expect changes in the future as the requirements of inputs to IndexOptions changes. Additionally we hide parsing this behind a temporary environment variable SRC_SEARCH_CORE_MIN_LAST_CHANGED.

Note: this supercedes a previous PR "introduce ConfigFingerprint" https://github.com/sourcegraph/sourcegraph/pull/27133. Instead it only exports a single function which takes in an http request/response and the site config. This hides business logic from the httpapi handler implementation.

Merge request reports

Loading