Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FeatureFlags: support changing at runtime #9748

Open
3 tasks
snaury opened this issue Sep 25, 2024 · 0 comments
Open
3 tasks

FeatureFlags: support changing at runtime #9748

snaury opened this issue Sep 25, 2024 · 0 comments
Assignees

Comments

@snaury
Copy link
Member

snaury commented Sep 25, 2024

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.
@snaury snaury self-assigned this Sep 25, 2024
@snaury snaury changed the title FeatureFlags: support changing in runtime FeatureFlags: support changing at runtime Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant