Zoekt cache should invalidate if multi match chunk size changes

What does this MR do and why?

This MR invalidates the Zoekt cache if the requested chunk count is changed when zoekt multi match is enabled

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

  1. setup gdk for zoekt

  2. enable feature flags

    Feature.enable(:zoekt_cache_search_responses)
    Feature.enable(:zoekt_multimatch_frontend)
  3. upload this file to any zoekt indexed project: https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/models/search/zoekt.rb

  4. search in using graphQL in group licensed_and_indexing_enabled as the search term

  5. change the chunkCount and verify that the results returned change the number of chunks returned

{
  blobSearch(search: "licensed_and_indexing_enabled",
    chunkCount: 5, 
    groupId: "gid://gitlab/Group/112") {
    matchCount
    perPage
    fileCount
    searchType
    searchLevel
    files {
      path
      fileUrl
      chunks {
        matchCountInChunk
        lines {
          lineNumber
          text
        }
      }
    }
  }
}
Edited by Terri Chu

Merge request reports

Loading