Skip to content

Reduce Gitaly calls for keeping around refs of published notes

Patrick Bajao requested to merge 226924-reduce-keep-around-commits into master

What does this MR do?

We are currently keeping around commits of each note being published even though they are all the same commits. That results to duplicate ref_exists calls.

For example, if there are 6 draft notes set to be published on a single MR version, there will be around 36 calls for ref_exists.

This fix reduces those calls by getting the unique shas to be kept. Based on local testing, this reduced the ref_exists calls from 36 to 4.

How to setup and validate locally (strongly suggested)

  1. Create a MR.
  2. Create multiple draft notes as part of a review on the diff.
  3. Publish review.
  4. Check if all the draft notes have been published as comments and shown on the diff properly.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Related to #226924 (closed)

Merge request reports

Loading