Skip to content

Commit

Permalink
Fix consistency between CP/metastore on auto-create index. (#5030)
Browse files Browse the repository at this point in the history
Metastore errors that are not necessarily aborted require us to restart
the CP actor to keep it in sync.

Closes #5014
  • Loading branch information
fulmicoton authored May 24, 2024
1 parent a400725 commit d71dfcf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions quickwit/quickwit-control-plane/src/control_plane.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ impl ControlPlane {
&mut self,
subrequests: &[GetOrCreateOpenShardsSubrequest],
progress: &Progress,
) -> ControlPlaneResult<()> {
) -> MetastoreResult<()> {
if !self.cluster_config.auto_create_indexes {
return Ok(());
}
Expand Down Expand Up @@ -777,11 +777,11 @@ impl Handler<GetOrCreateOpenShardsRequest> for ControlPlane {
request: GetOrCreateOpenShardsRequest,
ctx: &ActorContext<Self>,
) -> Result<Self::Reply, ActorExitStatus> {
if let Err(control_plane_error) = self
if let Err(metastore_error) = self
.auto_create_indexes(&request.subrequests, ctx.progress())
.await
{
return Ok(Err(control_plane_error));
return convert_metastore_error(metastore_error);
}
let response = match self
.ingest_controller
Expand Down

0 comments on commit d71dfcf

Please sign in to comment.