Delete p_ci_build_trace_metadata records after archival

We use this table to keep track of the archival attempts on the job logs and verify that the signature of the files are correct. But we don't have to keep the data around after the archival is successful.

That table also represents 0.124 TB of growth over last 90 days

#469056 (comment 2170783014)

Proposal

After the trace is successfully archived, delete the trace metadata record.

Implementation

  1. Implement immediate record removal upon successful file archiving. Include validating that checksum == remote_checksum (if remote_checksum not nil).
  • Monitor data growth rate of p_ci_build_trace_metadata before and after.
  1. Implement process to remove existing successfully archived trace metadata records. --> Moved to its own issue: #533933 (closed)
Edited by Leaminn Ma