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 a way to rebalance shards #2981
Comments
The optarg sounds slightly better to me. |
I think we should consider not adding an optarg or a command. The UX here is pretty confusing because the implications aren't clear. What exactly does it mean to rebalance vs not rebalance? What does it mean to drop the number of shards and not rebalance? Where does the data on the dropped shard go? As a user, when should I call this command and when shouldn't I (or alternatively, set the flag to true)? The whole thing is surprisingly confusing. Here are a few options:
I think either of these two options is fine (I'd have to think a bit about which one is better). The whole idea of rebalancing will go away when we move to consistent hashing, so I think we shouldn't introduce the option now if at all possible. |
Also note, we might want to rename |
It needs to be possible for the user to call Changing the shard boundaries is an expensive operation that causes loss of availability. However, calling the current implementation of |
@coffeemug: We need to make a decision on this. Also, this might be related to the question of how to pick split points when the user tries to shard an empty table. |
I think we should conceptually distinguish between Another confusing thing here is that I propose we add an opt arg I think this would give the best user experience, but it might be too complicated to implement? |
For the sake of keeping things simple in terms of implementation costs,
in combination with a separate |
I've thought about it a lot, and I'm not sure what to do here. Let's talk about it in person next week when @timmaxw gets back and settle on a good-enough solution for v1. |
Is there any corresponding webui component for this issue? |
There isn't one now (we used to merge reconfigure and rebalance into a single action), but we should consider adding one. |
After offline discussion, we decided to use a distribution query to calculate new shard points whenever the number of shards changes. The number of shards could change either by the user calling In addition, we'll have a rebalance command. I propose the following syntax: |
Would |
I'd say no. Maybe it should be |
I'd consider returning the table status. |
I think having Also users might get confused over what happens if they close the connection in the middle. Is the |
I think returning the status in a way similar to I propose we make
|
Do we also need |
I'd put that in polish. If we can get to it in time -- great. If not, I don't think it's a showstopper. |
OK, branch It's in CR 2303. |
Merged into |
Currently in
reql_admin
, shards are rebalanced whenever the number of shards increases, but not otherwise. We should add a way to rebalance shards. One option would be arebalance=True
argument toreconfigure()
, which forces a rebalance even if the number of shards has decreased or not changed. Another option is an explicitrebalance()
command.The text was updated successfully, but these errors were encountered: