Skip to content

Segment Membership: Skip count refresh for projects with unchanged identities #8100

Description

@khvn26

We still spend significant compute to scan segment membership counts every 6h for identities that weren't necessarily updated.

Acceptance criteria

  • An environment_id, maxState(inserted_at) watermark is materialised against the IDENTITIES table.
  • refresh_all_segment_counts only fans out segment membership count refresh tasks for projects which environment watermarks changed since the last query.
  • The watermark query complexity is not derived from total number of identities.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions