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
Storage: Customise setting dual writing modes #87668
Conversation
dfa06b8
to
5124629
Compare
5124629
to
a8e2fbe
Compare
3c95a6a
to
5e0c4b5
Compare
I think this approach is fine for now -- since we only have playlists, and progress is good! However -- given that this is a pattern we will want to apply incrementatlly to all the resources that migrate, i think it makes more sense to add a section to the config that can handle this: and then use it to pass in a mode rather than a bool here: |
also, one thing I was considering is that all functions |
Totally agree about updating the boolean parameter for dualwriting (second link you included) so that we replace it with the dual writing mode. About using config instead of feature flags though, I don't see a straightforward way of doing this currently. As far as I know, there is no way to apply different configs based on the deployment wave. That means if we want to use config to set the desired mode, we still need all the feature flags I already created and added. That's why I thought to use the feature flags directly. Next steps I want to try out:
|
That could be helpful. It would take a bunch of refactoring though so might be better to do that as a separate PR. |
One approach that we've used in cloud is to use an "implicit" (i.e. not defined/registered in the Grafana codebase) feature toggle to trigger configuration to render differently. So, you could use config for this after all. It'd still be effectively using a feature toggle, just not a grafana feature toggle. |
Good to know! I can see how that keep the list of Grafana feature toggles more manageable to read. Does it come with any other advantages (cost for example)? I'm going to try to get this merged as soon as possible so we can start trying out dual writing in ops but that could be an improvement to make along with some others I already have in mind. |
576c6f9
to
2e73c4f
Compare
What is this feature?
Adds the ability to update the dual writing mode based on entity using feature flags.
Why do we need this feature?
We need to be able to customise mode based on the following factors:
Who is this feature for?
k8s storage operators
Which issue(s) does this PR fix?:
Partial https://github.com/grafana/search-and-storage-team/issues/15
Special notes for your reviewer:
Please check that: