Skip to content

Epic: Segment membership inspection V1 #7405

Closed as not planned
8 of 13 issues completed
Closed as not planned

Description

@khvn26

Ship the ability to count, list, sample, and stream the identities matching a segment, in both self-hosted and Edge API projects.

Settings

  • settings.SEGMENT_MEMBERSHIP_ENABLED — Django boolean. Off by default, gates index maintenance signals so the feature is a dark no-op in self-hosted and SaaS until enabled.

Feature flags

  • segment_membership_index (Flagsmith on Flagsmith) — gates the SaaS rollout per organisation, plus the denylist for outlier orgs.

Core concept

Reduce segment evaluation to set algebra over a finite atom basis, materialise atoms as Roaring bitmaps in core Postgres, compose bitmaps to compute membership. Async maintenance via task processor. Read API exposes count / sample / members. Edge envs populated via DDB scan during backfill (no CDC in v1).

PK-as-ordinal: Identity.id is the bitmap ord directly — no IdentityOrdinal table, no allocation hot path.

User-facing documentation PR: #7399.

Notes

The RFC is the source of truth for design decisions: https://www.notion.so/355a2b634bf9815289b3d070e164f9eb (private to the Flagsmith team). Notable choices baked into v1:

Tech debt knowingly taken on:

Activity

  1. added theissue type on May 4, 2026
  2. changed the title [-]Segment membership inspection V1[/-] [+]Epic: Segment membership inspection V1[/+] on May 4, 2026
  3. khvn26 commented on May 9, 2026

    @khvn26
    MemberAuthor

    Superseded by #7469 — V1 (Beta) epic for the columnar design. The bitmap-based design this epic scoped was retired in favour of the columnar approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions