{"record":{"id":"7c49dce3732f48ca","repo":"juicedata/juicefs","slug":"failed-to-handle-d-objects","errorCode":null,"errorMessage":"failed to handle %d objects","messagePattern":"failed to handle (.+?) objects","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/sync/sync.go","lineNumber":2304,"sourceCode":"\t\t\tif deleted != nil {\n\t\t\t\tmsg += fmt.Sprintf(\", deleted: %d\", deleted.Current())\n\t\t\t}\n\t\t\tif failed != nil {\n\t\t\t\tmsg += fmt.Sprintf(\", failed: %d\", failed.Current())\n\t\t\t}\n\t\t\tif total-handled.Current() > 0 {\n\t\t\t\tmsg += fmt.Sprintf(\", lost: %d\", total-handled.Current())\n\t\t\t}\n\t\t\tlogger.Info(msg)\n\n\t\t\tif failed != nil {\n\t\t\t\tif n := failed.Current(); n > 0 || total > handled.Current() {\n\t\t\t\t\tif checkpointMgr != nil {\n\t\t\t\t\t\tif e := checkpointMgr.Save(checkpointMgr.checkpoint); e != nil {\n\t\t\t\t\t\t\tlogger.Warnf(\"Failed to save checkpoint after failure: %v\", e)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn fmt.Errorf(\"failed to handle %d objects\", n+total-handled.Current())\n\t\t\t\t}\n\t\t\t}\n\t\t\tif checkpointMgr != nil && !config.Dry {\n\t\t\t\tif e := try(3, func() error {\n\t\t\t\t\treturn checkpointMgr.DeleteCheckpoint()\n\t\t\t\t}); e != nil {\n\t\t\t\t\tlogger.Warnf(\"Failed to delete checkpoint after completion: %v\", e)\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tsendStats(config.Manager, workerUploads)\n\t\t\tfor len(srcDelayDel) > 0 {\n\t\t\t\tsendStats(config.Manager, workerUploads)\n\t\t\t}\n\t\t\tlogger.Infof(\"This worker process has already completed its tasks\")\n\t\t}\n\t\treturn nil\n\t}","sourceCodeStart":2286,"sourceCodeEnd":2322,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/pkg/sync/sync.go#L2286-L2322","documentation":"Returned at the end of `juicefs sync` when the failed counter shows objects that were not successfully handled (or totals exceed handled counts). The checkpoint is saved first so a re-run resumes at the failed objects; the count reports how many need attention.","triggerScenarios":"Thrown at pkg/sync/sync.go:2304 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-run the same sync command; it resumes from the checkpoint and retries failures","Inspect sync logs for the per-object errors behind the count"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}