Skip to content

Contribution analytics: Remove request batching when using Clickhouse

Alex Pennells requested to merge 427601-remove-batching into master

Stop restricting request size when using the Clickhouse backend. The batching solution was added to improve load times for PostgresQL, but actually slows the response when fetching from Clickhouse.

Screenshots or screen recordings

There's no visible changes, but you can monitor the GraphQL requests going out to see the change. Instead of requests broken up on a weekly basis, the full time period should be used for the fetched data.

Before After
Screenshot_2023-11-01_at_2.54.42_PM Screenshot_2023-11-01_at_2.55.04_PM

How to set up and validate locally

  • Visit the contribution analytics page for any group (ex. http://gdk.test/groups/flightjs/-/contribution_analytics)
  • Switch the date range to Last month or Last 3 months
  • Monitor the GraphQL requests on page load. Each request should be scoped to a single week
  • Feature.enable(:clickhouse_data_collection)
  • Monitor the GraphQL requests again. The requests should no longer be scoped

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #427601 (closed)

Edited by Alex Pennells

Merge request reports