Skip to content

Zoekt: update eviction task to use states

Dmitry Gruzd requested to merge zoekt-update-eviction-task-to-use-state into master

What does this MR do and why?

This MR starts using the states we've introduced in Handle orphaned zoekt indices (!164222 - merged) and Handle orphaned zoekt repos (!165576 - merged) in the eviction task.

Query plan

UPDATE "zoekt_indices" SET "state" = 240 WHERE "zoekt_indices"."zoekt_node_id" = 74 AND "zoekt_indices"."namespace_id" IN (65483768, 57492578, 6319754, 6429655, 52692953, 76816007, 54977334, 3595435, 12835280, 6177653, 11780591, 16930477, 66194383, 2711627, 15994091, 11575602, 66137700, 428185, 52594422, 6249184, 5505337, 11955172, 61447037, 6194497, 67911900, 2305346, 4482940, 62146674, 5172095, 7186678, 12480013, 7139154, 708804, 15488814, 720491, 10094001, 12125277, 16062329, 13200485, 7686032, 55879180, 6559755, 6318341, 5554861, 55583736, 8543333, 5218490, 82172856, 2850386, 54972270, 2018831, 1042374, 8039760, 6197474, 6312324, 1458779, 13560207, 6375558, 14525664, 6264792, 10789583, 3131667, 5096867, 2352993, 5671097, 5845771, 9643090, 188131, 4335587, 1613951, 567369, 4846252, 12272233, 5942915, 16174623, 6186820, 66587782, 10961500, 11286251, 51206349, 79342608, 70922375, 76138562, 81276410, 81312102, 79799536, 81508146, 81150444, 61859881, 72600756, 72160632, 70922768, 81128511, 56972935, 70922582, 79682277, 65392730, 78355839, 72101613, 78136696) AND "zoekt_indices"."zoekt_enabled_namespace_id" IS NOT NULL AND "zoekt_indices"."id" >= 61159;

https://postgres.ai/console/gitlab/gitlab-production-main/sessions/31468/commands/97716

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 Dmitry Gruzd

Merge request reports

Loading