-
Notifications
You must be signed in to change notification settings - Fork 236
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
Add option 'participate_in_2i_coverage' with default 'enabled' #1664
Add option 'participate_in_2i_coverage' with default 'enabled' #1664
Conversation
This option is processed in riak_core when gathering nodes to participate in coverage queries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be getting added to riak_core ?
Sadly that's not how it works |
I'm confused, can you clarify please |
But I haven't thought much about it. Should it even have I do think there is not the abstraction/separation that people expect from core. But we did agree that basho/riak_core was for riak_kv in the last meeting. |
This p/r is just for the cuttlefish schema - all the related p/r are targeted at riak_core - this p/r is targeted at riak_kv - seems strange. |
I think that's just how it is with the fish. Look at the existing schema, search |
And it makes sense, riak_kv uses riak_core, so riak_kv sets the application env variables for riak_core based on its use. If you had a typical erlang release with a sys.config that depends on 10 apps, where do you configure your release? In the top level sys.config, not each dependant app, right? |
Hmm. It doesn't appear to be that way with every other project in the tree. The schema is placed in the same project as the functionality it controls - then they are ordered and concatenated at release time.
|
I disagree. There are schemas for projects and then there is config at the top-level. It can be both. Did you read my example above? Did you look at the kv schema? Let's get down to it: are you saying add this config to riak_core schema in order for there to be a +1 on this feature? |
To my mind it would seem the place to put it. Perhaps get a second opinion from someone like @martincox ? Apart from that, it's +1. |
I don't get it. Should we also move: And the riak_dt compression option https://github.com/ramensen/riak_kv/blob/abea4e0a7b4799760ad48df3519d697b5b7837da/priv/riak_kv.schema#L430-L556? Let me explain again, using riak_dt compression as an example. Riak_dt the app exposes the configuration option for compression (it may even have a default in riak_dt), but riak_kv (the USER of the dependancy) decides the value. For riak_kv that value is |
In this case - the user sets the configuration value in
(on reflection 'true' or 'false' would have been nicer there but whatevs) And riak_core performs a read of that value, here: https://github.com/basho/riak_core/pull/917/files#diff-187256fc99c333fb811ba3c5edae7f00R516 and here: https://github.com/basho/riak_core/pull/917/files#diff-79f7a4d38797ea467d8ef98f44d1a0d3R162 Riak KV doesn't really come into it - apart from the targeting of this schema change at 'riak_kv' repository - that's why I made the suggestion. I looked through the examples you gave, yep, the mixing of riak_core settings into the kv schema has been going on for 4 years now - I can't say that's great imho. The way cuttlefish was intended to be used was, define the setting in the project (a) where the value is used, override it in project b which uses a. From the wiki
Does this make sense to you or am I going off on a tangent ? |
You're on a tangent. Riak_KV comes into it because riak_kv has 2i queries. It uses the config. Not riak_core. I am also a strong disagree on |
I know how the fish works and how it builds the config, but the configuration of THIS riak_core property is not a matter for riak_core, it is a matter for riak_kv. I don't know how better to explain it than to say (again) that the application that uses the dependancy configures the dependancy for it's own use. |
Describing the setting of kv defaults for core as " the mixing of riak_core settings into the kv schema " is just incorrect. KV uses core, so it configures core. Right? We don't ship core configured for KV, the applications that build on core configure for their use cases. |
@bryanhuntesl it doesn't scale, nor is it fair on him, to call coxy in to arbitrate. You took the review on, I'd like to know if my arguments above have made any sense to you. Another example I thought of…imagine you write a product that sits on top of riak, let's call it riak_cs (for sake of argument). Riak exposes certain configurable options (backend, n_val etc). Your product, riak_cs, sets these things, it doesn't expect Riak to define values for riak_cs. Sure, riak defines defaults, but riak_cs configures riak (backend=multi_backend etc) for it's use case. Right? |
If nothing else, it is a least idiomatic to configure the setting this way, you must concede that |
Your arguments don't make sense to me. I've used cuttlefish many times with nested projects. The schema goes in the project which it is used to configure, you then override the defaults (if required) at release time and via the Regarding the two examples you gave, their configuration is in the wrong place, I recall once, during my Basho tenure, trying to discover what a cuttlefish setting was being converted to but being unable to locate it, it was frustrating at the time, I was trying to solve a customer issue. Because someone has done something wrong once, does that become the norm? It's not the end of the world, but no, it is not idiomatic or correct to put the schema configuration for one project into another. Cuttlefish is not just a convenience utility, it provides some documentation for a projects environment variables, tweaks and settings. I provided an excerpt and a link to the cuttlefish wiki in my earlier comment. I don't have anything more to add, if you want to get someone else to take a look, I'm happy to accept their judgement. |
So what do you need to happen? The config should be in kv, but you want a default in the core schema too? |
We need some consistency here. Someone from bet365 just yolo merges adding riak_repl to riak, but this…this change… |
@bryanhuntesl - will you accept me as an arbitrator on this? I agree with @russelldb, but even if I didn't, I don't think there is a new issue being introduced which justifies holding everything up. The GitHub issue will hold your counter-argument and opinion for the permanent record, and given the bike-shed nature of this, I think that should be enough. Can we +1? |
No problem - your vote is the decider. +1 |
This option is processed in riak_core when gathering nodes to
participate in coverage queries.
See basho/riak_core#917 for details. This PR just adds the schema mapping for that feature