Skip to content

FeatureFlags: support changing at runtime #9748

Closed

Description

@snaury

Enabling and disabling feature flags takes way too long right now, because we don't only have to update the config, we need to restart all nodes to apply the new config, which can take hours for large databases. We need to fix feature flags and update them at runtime, as soon as the new config is uploaded. Here's a rough plan:

  • Write a code generator that would generate TFeatureFlags class from protos
    Values would be stored as atomic bit flags.
    Get... and Set... would need to update those atomically.
    operator= and Merge methods would change those in batches (no need to guarantee consistency between different flags though, since 64 bits wouldn't be enough for all flags).
    Has... methods shouldn't be needed, which would simplify bit management.
  • Make sure current uses of AppData()->FeatureFlags won't break when flags start changing at runtime, and switch to the new class.
  • Write a config updater actor, that would subscribe to feature flags updates and apply new config at runtime.
  • Add a monitoring page that displays current feature flags and the number of subscribers

Activity

  1. self-assigned this
    on Sep 25, 2024
  2. changed the title [-]FeatureFlags: support changing in runtime[/-] [+]FeatureFlags: support changing at runtime[/+] on Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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