{"record":{"id":"a14757ed355b3b72","repo":"ipfs/kubo","slug":"committing-orphaned-keystore-cleanup-batch-w","errorCode":null,"errorMessage":"committing orphaned keystore cleanup batch: %w","messagePattern":"committing orphaned keystore cleanup batch: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/node/provider.go","lineNumber":578,"sourceCode":"\t\t\treturn ctx.Err()\n\t\t}\n\t\tif result.Error != nil {\n\t\t\treturn fmt.Errorf(\"iterating orphaned keystore data: %w\", result.Error)\n\t\t}\n\t\tif batch == nil {\n\t\t\tbatch, err = ds.Batch(ctx)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"creating batch for orphaned keystore cleanup: %w\", err)\n\t\t\t}\n\t\t}\n\t\tif err := batch.Delete(ctx, datastore.NewKey(result.Key)); err != nil {\n\t\t\treturn fmt.Errorf(\"batch deleting orphaned key %s: %w\", result.Key, err)\n\t\t}\n\t\tcount++\n\t\tpending++\n\t\tif pending >= purgeBatchSize {\n\t\t\tif err := batch.Commit(ctx); err != nil {\n\t\t\t\treturn fmt.Errorf(\"committing orphaned keystore cleanup batch: %w\", err)\n\t\t\t}\n\t\t\tif err := ds.Sync(ctx, syncKey); err != nil {\n\t\t\t\treturn fmt.Errorf(\"syncing orphaned keystore cleanup: %w\", err)\n\t\t\t}\n\t\t\tbatch = nil\n\t\t\tpending = 0\n\t\t}\n\t}\n\tif pending > 0 {\n\t\tif err := batch.Commit(ctx); err != nil {\n\t\t\treturn fmt.Errorf(\"committing orphaned keystore cleanup batch: %w\", err)\n\t\t}\n\t\tif err := ds.Sync(ctx, syncKey); err != nil {\n\t\t\treturn fmt.Errorf(\"syncing orphaned keystore cleanup: %w\", err)\n\t\t}\n\t}\n\tif count > 0 {\n\t\tproviderLog.Infow(\"purged orphaned provider keystore data from shared datastore\", \"keys\", count)","sourceCodeStart":560,"sourceCodeEnd":596,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/node/provider.go#L560-L596","documentation":"Fired by purgeOrphanedKeystoreData when batch.Commit fails after the purge batch size threshold is reached. The accumulated deletes for orphaned keystore entries could not be persisted, so the pass aborts with the wrapped datastore error.","triggerScenarios":"Thrown at core/node/provider.go:578 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Restart the daemon; the cleanup re-runs and skips already-deleted keys","Verify disk space and datastore integrity if it repeats","Consult docs/datastores.md for repair guidance"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}