Skip to content

Create GPG commit signature in bulk

What does this MR do?

Making some experiments with heavy push payloads I realized that the create_gpg_signature queue had some really steep spikes. Right now, we only launch one CreateGpgSignatureWorker per each commit while we could benefit from calculating the signature in batch.

In the situation that we had 100 commits, per each worker we:

  • create CreateGpgSignatureWorker (x100)
  • call project.commit through Gitaly (x100)
  • call Project.find (x100)
  • call extract_signature_lazily through Gitaly (x100)
  • call GpgSignature.find_by (x100)
  • insert the Signature (x100)

Making this operation in bulk with this approach, the results would be:

  • create CreateGpgSignatureWorker (x1)
  • call project.commit through Gitaly (x1)
  • call Project.find (x1)
  • call extract_signature_lazily through Gitaly (x1)
  • call GpgSignature.find_by (x100)
  • insert the Signature (x100)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Refs #37736 (closed)

Edited by Nick Thomas

Merge request reports