-
Notifications
You must be signed in to change notification settings - Fork 279
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
Divergence of the number of shards in the metastore vs as seen from the control plane #5008
Labels
bug
Something isn't working
Comments
This is probably not the cause, but this causes a divergence between metastore and CP if let Err(control_plane_error) = self
.auto_create_indexes(&request.subrequests, ctx.progress())
.await
{
return Ok(Err(control_plane_error));
} |
I suspect the problem is that we
So if an ingester happens to be unreachable etc., we end up with some dangling shard in the metastore. |
scale_up shards seems buggy too.
|
fulmicoton
added a commit
that referenced
this issue
May 26, 2024
On scale up, rebalance, and get_or_open_shards, the control plane was: - recording a shard on the metastore - writing the shard - record the shard on the control plane model. Error handling was not done, so a transport failure on the metastore, or (more likely) an error failure on init would break consistency between the metastore and the control plane. This PR factorizes the idea of opening a new shard for scale up, rebalance and get_or_open_shards. The new factorize logic goes: - init first - record in the metastore - record the shard on the control plane model. The last two steps are also factorized together to emphasize that we keep the control plane and metastore in sync. It works by forcing a restart of the control plane if the metastore returns an error for which we don't know if the write was a success or not. Closes #5008 Closes #5020 Closes #5013 test compilation
fulmicoton
added a commit
that referenced
this issue
May 26, 2024
On scale up, rebalance, and get_or_open_shards, the control plane was: - recording a shard on the metastore - writing the shard - record the shard on the control plane model. Error handling was not done, so a transport failure on the metastore, or (more likely) an error failure on init would break consistency between the metastore and the control plane. This PR factorizes the idea of opening a new shard for scale up, rebalance and get_or_open_shards. The new factorize logic goes: - init first - record in the metastore - record the shard on the control plane model. The last two steps are also factorized together to emphasize that we keep the control plane and metastore in sync. It works by forcing a restart of the control plane if the metastore returns an error for which we don't know if the write was a success or not. Closes #5008 Closes #5020 Closes #5013
fulmicoton
added a commit
that referenced
this issue
May 26, 2024
On scale up, rebalance, and get_or_open_shards, the control plane was: - recording a shard on the metastore - writing the shard - record the shard on the control plane model. Error handling was not done, so a transport failure on the metastore, or (more likely) an error failure on init would break consistency between the metastore and the control plane. This PR factorizes the idea of opening a new shard for scale up, rebalance and get_or_open_shards. The new factorize logic goes: - init first - record in the metastore - record the shard on the control plane model. The last two steps are also factorized together to emphasize that we keep the control plane and metastore in sync. It works by forcing a restart of the control plane if the metastore returns an error for which we don't know if the write was a success or not. Closes #5008 Closes #5020 Closes #5013
fulmicoton
added a commit
that referenced
this issue
May 26, 2024
On scale up, rebalance, and get_or_open_shards, the control plane was: - recording a shard on the metastore - writing the shard - record the shard on the control plane model. Error handling was not done, so a transport failure on the metastore, or (more likely) an error failure on init would break consistency between the metastore and the control plane. This PR factorizes the idea of opening a new shard for scale up, rebalance and get_or_open_shards. The new factorize logic goes: - init first - record in the metastore - record the shard on the control plane model. The last two steps are also factorized together to emphasize that we keep the control plane and metastore in sync. It works by forcing a restart of the control plane if the metastore returns an error for which we don't know if the write was a success or not. Closes #5008 Closes #5020 Closes #5013
fulmicoton
added a commit
that referenced
this issue
May 26, 2024
On scale up, rebalance, and get_or_open_shards, the control plane was: - recording a shard on the metastore - writing the shard - record the shard on the control plane model. Error handling was not done, so a transport failure on the metastore, or (more likely) an error failure on init would break consistency between the metastore and the control plane. This PR factorizes the idea of opening a new shard for scale up, rebalance and get_or_open_shards. The new factorize logic goes: - init first - record in the metastore - record the shard on the control plane model. The last two steps are also factorized together to emphasize that we keep the control plane and metastore in sync. It works by forcing a restart of the control plane if the metastore returns an error for which we don't know if the write was a success or not. Closes #5008 Closes #5020 Closes #5013
fulmicoton
added a commit
that referenced
this issue
May 30, 2024
* Fixes control plane/metastore inconsistency due to open shard. On scale up, rebalance, and get_or_open_shards, the control plane was: - recording a shard on the metastore - writing the shard - record the shard on the control plane model. Error handling was not done, so a transport failure on the metastore, or (more likely) an error failure on init would break consistency between the metastore and the control plane. This PR factorizes the idea of opening a new shard for scale up, rebalance and get_or_open_shards. The new factorize logic goes: - init first - record in the metastore - record the shard on the control plane model. The last two steps are also factorized together to emphasize that we keep the control plane and metastore in sync. It works by forcing a restart of the control plane if the metastore returns an error for which we don't know if the write was a success or not. Closes #5008 Closes #5020 Closes #5013 * Apply suggestions from code review Co-authored-by: Adrien Guillo <adrien@quickwit.io> * Apply suggestions from code review Co-authored-by: Adrien Guillo <adrien@quickwit.io> --------- Co-authored-by: Adrien Guillo <adrien@quickwit.io>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As observed on airmail
While the control plane sees a much lower shard count (~3000s)
The text was updated successfully, but these errors were encountered: