{"record":{"id":"daf3ce77f5f169e6","repo":"juicedata/juicefs","slug":"apply-object-action-failed-in-inode-d-key-v-err","errorCode":null,"errorMessage":"apply object action failed in inode:%d key:%v: err:%s","messagePattern":"apply object action failed in inode:(.+?) key:(.+?): err:(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/tier.go","lineNumber":326,"sourceCode":"\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tlogger.Errorf(\"read chunk %d of ino %d failed: %s\", index, ino, eno)\n\t\t}\n\t}\n\treturn objs\n}\nfunc visitEntry(m meta.Meta, format *meta.Format, ino meta.Ino, attr meta.Attr, objectFunc func(key string) error, metaFunc func(ino meta.Ino) error, checkFunc func(ino meta.Ino, oriTier uint8) bool) error {\n\tif checkFunc != nil && checkFunc(ino, attr.Tier) {\n\t\treturn nil\n\t}\n\tobjs := getObjKeys(m, format, ino, attr.Length)\n\tif objectFunc != nil {\n\t\tfor _, key := range objs {\n\t\t\tif key != \"\" {\n\t\t\t\terr := objectFunc(key)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"apply object action failed in inode:%d key:%v: err:%s\", ino, key, err)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif metaFunc != nil {\n\t\tif err := metaFunc(ino); err != nil {\n\t\t\treturn fmt.Errorf(\"set tier for inode %d failed: %w\", ino, err)\n\t\t}\n\t}\n\treturn nil\n}\n","sourceCodeStart":308,"sourceCodeEnd":338,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/cmd/tier.go#L308-L338","documentation":"visitEntry applies the per-object action (objectFunc — e.g. tier transition or restore request) to each object key backing an inode. If the object storage operation fails for a specific key, the error is wrapped with the inode and key so the user can locate the offending object. The inner error is the object-storage-level failure (throttling, missing object, storage class mismatch, etc.).","triggerScenarios":"`juicefs tier` or `juicefs restore` iterating objects of a file where the objectFunc call on one key fails — e.g. the object was deleted in object storage, or the storage class transition is not allowed.","commonSituations":"Objects removed externally (bucket lifecycle rules) while JuiceFS still references them; cloud API throttling (SlowDown/503) during bulk tiering; wrong storage-class name in the volume config; expired or insufficient cloud credentials.","solutions":["Locate the failing object via the inode and key in the message, then check the object directly in the bucket.","Read the inner err:%s text for the cloud API error code (e.g. NoSuchKey, SlowDown).","Re-run the command — for throttling errors, reduce concurrency or retry later.","If the object is gone, repair with `juicefs fsck` or remove the stale chunk from metadata."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := objectFunc(key); err != nil {\n    if isThrottleErr(err) { // SlowDown / 503\n        time.Sleep(backoff)\n        return objectFunc(key)\n    }\n    return fmt.Errorf(\"key %s: %w\", key, err)\n}","preventionTips":["Verify objects referenced by JuiceFS are not managed by bucket lifecycle rules","Use cloud credentials with tier/restore permissions on the target storage class","Throttle concurrency when tiering large trees to avoid cloud API throttling"],"tags":["object-storage","tier","cli","cloud"],"backgroundTag":"http-error-response","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"}