Skip to content
Snippets Groups Projects

Apply `without_count: true` to the `group/{id}/audit_events` API

Compare changes
  • Side-by-side
  • Inline
Files
2
  • In [issue 337757][0], we added a query to return all of the project
    audit events under a group in addition to the group-level audit
    events.
    
    The query appears to work ok, however the `COUNT` that happens before
    the query ends up timing out. The problem is the count query attempts
    to count 10001 rows. That reads 100x more data than the pagination
    query where we return only 100 rows.
    
    For large datasets, of which the `audit_events` table qualifies, we
    usually skip the default behavior of doing a count query
    
    The `paginate()` method accepts a `without_count: true|false` flag. We
    should add a toggle of that flag with a FF.
    
    We want to be able to make sure that whenever
    `audit_event_group_rollup` FF is enabled, this is enabled. However we
    also want to be able to toggle the paginate flag independently
    
    [0]:#337757
    
    EE: true
    Changelog: changed
Loading