Support generating billable_members_count for very large customers

Problem

For large subscriptions, the namespace loading might fails on generating the billable user due to PG::QueryCanceled: ERROR: canceling statement due to statement timeout.

Remove the expensive attribute from flows that ... (#11718 - closed) is fixing this problem for the index page, purchase syncing, reconciliation, and the admin page but we still have other affected flows

  1. Auto-renewal
  2. Add-seats flow
  3. Purchase flow

which do actually need the current seats in use amount.

Proposal

Figure out how to support generating this attribute for very large customers

There's been quite a few different efforts to look into how to improve this, including more recently:

  1. https://gitlab.com/gitlab-org/fulfillment/meta/-/issues/1967+
  2. https://gitlab.com/gitlab-org/customers-gitlab-com/-/issues/7130+

Result

Next steps (if any)

How will we measure success?

Edited Jan 02, 2025 by Diana Zubova
Assignee Loading
Time tracking Loading