-
Notifications
You must be signed in to change notification settings - Fork 448
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
Fix shard weight. Now we can set it to zero #1192
Conversation
It's problem with other settings as well AFAIK. |
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.
Please provide a usage example. Ideally a test, but even example would be helpful.
Yes, imagine a system where historical data is filled from shard to shard. And now, when a new shard is added, we need to limit writing to the previous ones. We can write data directly to the node (which is more efficient in terms of resources), but we can also write it to a distributed table. So, in order to limit writing to already filled shards, we can set their weight to 0. Currently, it is not possible to disable writing completely. The minimum weight that can be set is 1. An example of the desired configuration will be below:
This example will not work because a weight of 0 will be considered an empty value and will not be included in the final configuration. In this case, the weight of all shards will be equal to 1. |
8ffe65a
to
c8676e1
Compare
c8676e1
to
7f0cbc5
Compare
I'll take a look on this PR |
* Shard weight can be set to zero (cherry picked from commit 5033f9e)
I can't set the shard weight to zero
We need it for some reasons...
Hopefully this MR will fix that