weaviate/weaviate · error
can't pass empty shard name
Error message
can't pass empty shard name
What it means
Argument guard in Module.Delete: shardName is empty while nodeName is non-empty. That combination is ambiguous — deleting one node's copy of an unspecified shard — so it is rejected. (An empty shardName with an empty nodeName is the supported 'delete all frozen shards for the class' mode; this guard only fires when exactly the shard is missing.)
Source
Thrown at modules/offload-s3/module.go:401
return nil
}
}
return err
}
// Delete deletes content of a shard assigned to specific node in
// cloud provider (S3, Azure Blob storage, Google cloud storage)
// Careful: if shardName and nodeName is passed empty it will delete all class frozen shards in cloud storage
// {cloud_provider}://{configured_bucket}/{className}/{shardName}/{nodeName}/{shard content}
func (m *Module) Delete(ctx context.Context, className, shardName, nodeName string) error {
start := time.Now()
if className == "" {
return fmt.Errorf("can't pass empty class name")
}
if shardName == "" && nodeName != "" {
return fmt.Errorf("can't pass empty shard name")
}
if nodeName == "" && shardName != "" {
return fmt.Errorf("can't pass empty node name")
}
ctx, cancel := context.WithTimeout(ctx, m.timeout)
defer cancel()
cloudPath := fmt.Sprintf("s3://%s/%s/%s/%s/*", m.Bucket, strings.ToLower(className), shardName, nodeName)
// update cloud path on deleting a class
if shardName == "" && nodeName == "" {
cloudPath = fmt.Sprintf("s3://%s/%s/*", m.Bucket, strings.ToLower(className))
}
cmd := []string{
fmt.Sprintf("--endpoint-url=%s", m.Endpoint),View on GitHub (pinned to 75aa4b6d11)
Solutions
- Pass the shard name together with the node name to delete a specific node's shard copy
- If deleting all frozen shards for the class is intended, leave both shardName and nodeName empty
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at modules/offload-s3/module.go:401 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/4f33b2e0cb6cefff.
Report an issue: GitHub.