{"record":{"id":"29004b2d2483364b","repo":"weaviate/weaviate","slug":"put-initial-metadata-w","errorCode":null,"errorMessage":"put initial metadata: %w","messagePattern":"put initial metadata: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"usecases/backup/coordinator.go","lineNumber":315,"sourceCode":"\tc.observeRestorePhase(\"prepare\", time.Since(canCommitStart))\n\tif err != nil {\n\t\tc.lastOp.reset()\n\t\treturn err\n\t}\n\n\t// Set status to Transferring now that staging has begun\n\tc.descriptor.Status = backup.Transferring\n\tc.lastOp.set(backup.Transferring)\n\n\toverrideBucket := req.Bucket\n\toverridePath := req.Path\n\n\t// initial put so restore status is immediately available\n\tif err := store.PutMeta(ctx, GlobalRestoreFile, c.descriptor, overrideBucket, overridePath); err != nil {\n\t\tc.lastOp.reset()\n\t\treq := &AbortRequest{Method: OpRestore, ID: desc.ID, Backend: req.Backend}\n\t\tc.abortAll(ctx, req, nodes)\n\t\treturn fmt.Errorf(\"put initial metadata: %w\", err)\n\t}\n\n\tstatusReq := StatusRequest{Method: OpRestore, ID: desc.ID, Backend: req.Backend, Bucket: overrideBucket, Path: overridePath}\n\tg := func() {\n\t\tdefer c.lastOp.reset()\n\t\tctx := context.Background()\n\n\t\t// checkStorageCancelled reads from storage to check if restore was cancelled.\n\t\t// Storage is the authoritative source since it works across all nodes in the cluster.\n\t\t// Returns true if the restore should stop due to cancellation.\n\t\t// Treats both CANCELLING and CANCELLED as cancellation signals - CANCELLING means\n\t\t// another coordinator has claimed and is processing the cancellation.\n\t\tcheckStorageCancelled := func() bool {\n\t\t\tstoredMeta, err := store.Meta(ctx, GlobalRestoreFile, overrideBucket, overridePath)\n\t\t\tif err != nil {\n\t\t\t\treturn false // Can't read storage, continue with operation\n\t\t\t}\n\t\t\tif storedMeta.Status == backup.Cancelled || storedMeta.Status == backup.Cancelling {","sourceCodeStart":297,"sourceCodeEnd":333,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/usecases/backup/coordinator.go#L297-L333","documentation":"Returned during a distributed restore after participants committed: writing the initial global restore metadata (PutMeta of GlobalRestoreFile, with status set to Transferring) to the backend failed. Because commit already happened, the coordinator not only resets local state but also issues an AbortRequest via abortAll to roll back the participants.","triggerScenarios":"Thrown at usecases/backup/coordinator.go:315 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check backup backend availability, credentials, and bucket/path write permissions","Inspect node logs for the subsequent abort messages to confirm all participants rolled back cleanly","Fix the backend issue and retry the restore from scratch"],"exampleFix":null,"handlingStrategy":"retry","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"}