Create GPG commit signature in bulk
requested to merge fj-37736-improve-performance-post-receive-create-gpg-siganture-worker into master
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?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Conforms to the code review guidelines
-
Has been reviewed by a UX Designer -
Has been reviewed by a Frontend maintainer -
Has been reviewed by a Backend maintainer -
Has been reviewed by a Database specialist
-
-
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
If you have multiple commits, please combine them into a few logically organized commits by squashing them -
Internationalization required/considered -
End-to-end tests pass ( package-and-qa
manual pipeline job)
What are the relevant issue numbers?
Refs #37736 (closed)