weaviate/weaviate · error
%v
Error message
%v
What it means
The actual status transition is performed by i.shards.UpdateShardStatus with the parsed index, shard, target status, and schema version. Any error returned here is written as a 500 with the raw error text. At this point input validation has passed, so the failure is on the storage/consistency side: shard not found locally, shard in a conflicting lifecycle state, or a schema-version consistency check failing during replication.
Source
Thrown at adapters/handlers/rest/clusterapi/indices.go:1321
}
targetStatus, err := shared.IndicesPayloads.UpdateShardStatusParams.
Unmarshal(reqPayload)
if err != nil {
http.Error(w, "unmarshal find doc ids params from json: "+err.Error(),
http.StatusBadRequest)
return
}
schemaVersion, err := extractSchemaVersionFromUrlQuery(r.URL.Query())
if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
err = i.shards.UpdateShardStatus(r.Context(), index, shard, targetStatus, schemaVersion)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
})
}
func (i *indices) postShardFile() http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
args := i.regexpShardFiles.FindStringSubmatch(r.URL.Path)
if len(args) != 4 {
http.Error(w, "invalid URI", http.StatusBadRequest)
return
}
index, shard, filename := args[1], args[2], args[3]
ct, ok := shared.IndicesPayloads.ShardFiles.CheckContentTypeHeaderReq(r)
if !ok {
http.Error(w, errors.Errorf("unexpected content type: %s", ct).Error(),View on GitHub (pinned to 75aa4b6d11)
Solutions
- Ensure the request targets a node that hosts the shard (check shard distribution)
- Check node logs for the underlying UpdateShardStatus error text
- Retry the transition after any concurrent shard operation (backup, replica move) completes
- Re-sync schema state across nodes if version consistency errors appear
Defensive patterns
Strategy: retry
Validate before calling
// confirm the node hosts the shard and the transition is legal
if !nodeHasShard(index, shard) {
return fmt.Errorf("shard %s/%s not on this node", index, shard)
}
if current == target {
return nil // no-op, skip the call
} Try / catch
err := client.UpdateShardStatus(ctx, index, shard, target, sv)
if err != nil {
log.Warnf("update shard status failed: %v", err)
if isConflict(err) { return refreshSchemaAndRetry() }
return backoffRetry(err)
} Prevention
- Verify shard placement before sending status transitions
- Avoid concurrent transitions on the same shard (backups, replica moves)
- Refresh schema after topology changes before issuing updates
- Read the 500 body — it carries the specific storage-side error
When it happens
Trigger: POST update-shard-status where the local node cannot apply the requested state transition — shard does not exist on this node, store is closing, the target state conflicts with the current state, or the schema-version propagation fails.
Common situations: Requests routed to nodes not hosting the shard; concurrent status updates racing (e.g. readonly set while shard is shutting down); shard replacement/replica-move in progress; schema out of sync between nodes.
Related errors
- failed to marshal response: %+v, error: %v
- request body too large
- unmarshal find doc ids params from json: %v
- request_id not provided
- unrecognized command: %s
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/f06068f28bad051d.
Report an issue: GitHub.