Skip to content

Add storage watermark to zoekt indices

John Mason requested to merge jm-zoekt-index-reserved-storage-watermark into master

What does this MR do and why?

This will update zoekt indices to have a watermarked state whenever their total storage usage goes over a watermark compared to their reserved storage.

Relates to &14886

Query Plan

  1. https://console.postgres.ai/gitlab/gitlab-production-main/sessions/32127/commands/99413
SELECT "zoekt_indices".* FROM "zoekt_indices" WHERE "zoekt_indices"."watermark_level" != 60 AND (reserved_storage_bytes > 0) AND ((used_storage_bytes / reserved_storage_bytes::double precision) >= 0.85)
  1. https://console.postgres.ai/gitlab/gitlab-production-main/sessions/32127/commands/99412
SELECT "zoekt_indices".* FROM "zoekt_indices" WHERE "zoekt_indices"."watermark_level" NOT IN (30, 60) AND "zoekt_indices"."reserved_storage_bytes" > 0 AND ((used_storage_bytes / reserved_storage_bytes::double precision) >= 0.7)

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.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by John Mason

Merge request reports

Loading