Fix partition_id for ci_build_report_results
Ref: #387301 (closed)
What does this MR do and why?
This MR fixes invalid ci_build_report_results
records in production and sets the partition_id
to 100.
Database
We have around ~22K records to fix.
Following a similar strategy used in !111287 (merged), I choose a default batch size of 2_000
and a sub batch size of 200
.
select count(*) from ci_build_report_results where partition_id = 101;
UPDATE ci_build_report_results
SET partition_id = 100
WHERE ci_build_report_results.build_id BETWEEN 100000 AND 100200
AND ci_build_report_results.partition_id = 101
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Max Orefice