{"record":{"id":"a125ed909a1837cf","repo":"weaviate/weaviate","slug":"can-t-pass-empty-node-name","errorCode":null,"errorMessage":"can't pass empty node name","messagePattern":"can't pass empty node name","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/offload-s3/module.go","lineNumber":405,"sourceCode":"}\n\n// Delete deletes content of a shard assigned to specific node in\n// cloud provider (S3, Azure Blob storage, Google cloud storage)\n// Careful: if shardName and nodeName is passed empty it will delete all class frozen shards in cloud storage\n// {cloud_provider}://{configured_bucket}/{className}/{shardName}/{nodeName}/{shard content}\nfunc (m *Module) Delete(ctx context.Context, className, shardName, nodeName string) error {\n\tstart := time.Now()\n\n\tif className == \"\" {\n\t\treturn fmt.Errorf(\"can't pass empty class name\")\n\t}\n\n\tif shardName == \"\" && nodeName != \"\" {\n\t\treturn fmt.Errorf(\"can't pass empty shard name\")\n\t}\n\n\tif nodeName == \"\" && shardName != \"\" {\n\t\treturn fmt.Errorf(\"can't pass empty node name\")\n\t}\n\n\tctx, cancel := context.WithTimeout(ctx, m.timeout)\n\tdefer cancel()\n\n\tcloudPath := fmt.Sprintf(\"s3://%s/%s/%s/%s/*\", m.Bucket, strings.ToLower(className), shardName, nodeName)\n\n\t// update cloud path on deleting a class\n\tif shardName == \"\" && nodeName == \"\" {\n\t\tcloudPath = fmt.Sprintf(\"s3://%s/%s/*\", m.Bucket, strings.ToLower(className))\n\t}\n\n\tcmd := []string{\n\t\tfmt.Sprintf(\"--endpoint-url=%s\", m.Endpoint),\n\t\t\"rm\",\n\t\tcloudPath,\n\t}\n","sourceCodeStart":387,"sourceCodeEnd":423,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/modules/offload-s3/module.go#L387-L423","documentation":"Argument guard in Module.Delete: nodeName is empty while shardName is non-empty (note the message says 'node name', scoping this record). Deleting a shard's data without naming the node is ambiguous for single-node shard copies, so the call is rejected before touching object storage.","triggerScenarios":"Thrown at modules/offload-s3/module.go:405 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the node name alongside the shard name to identify which node's shard content to delete","If the whole-shard/whole-class deletion is intended, adjust the other arguments accordingly per the Delete contract"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"75aa4b6d11f8818305aafd4440b4e32794f7ca04","analyzedAt":"2026-09-04T14:58:20.392Z","contentChangedAt":"2026-09-04T14:58:20.392Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}