Fix shard weight. Now we can set it to zero#1192
Fix shard weight. Now we can set it to zero#1192sunsingerus merged 4 commits intoAltinity:0.23.0from
Conversation
|
It's problem with other settings as well AFAIK. |
alex-zaitsev
left a comment
There was a problem hiding this comment.
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