{"record":{"id":"cd7de277d0b45320","repo":"juicedata/juicefs","slug":"load-v-s","errorCode":null,"errorMessage":"load %v: %s","messagePattern":"load (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/meta/dump.go","lineNumber":496,"sourceCode":"\t\tcase \"Sustained\":\n\t\t\terr = dec.Decode(&dm.Sustained)\n\t\tcase \"DelFiles\":\n\t\t\terr = dec.Decode(&dm.DelFiles)\n\t\tcase \"Quotas\":\n\t\t\terr = dec.Decode(&dm.Quotas)\n\t\tcase \"UserQuotas\":\n\t\t\terr = dec.Decode(&dm.UserQuotas)\n\t\tcase \"GroupQuotas\":\n\t\t\terr = dec.Decode(&dm.GroupQuotas)\n\t\tcase \"ChangeLog\":\n\t\t\terr = dec.Decode(&dm.ChangeLog)\n\t\tcase \"FSTree\":\n\t\t\t_, err = decodeEntry(dec, 0, counters, parents, dm.Quotas, refs, bar, load, addChunk)\n\t\tcase \"Trash\":\n\t\t\t_, err = decodeEntry(dec, 1, counters, parents, nil, refs, bar, load, addChunk)\n\t\t}\n\t\tif err != nil {\n\t\t\terr = fmt.Errorf(\"load %v: %s\", name, err)\n\t\t\treturn\n\t\t}\n\t}\n\t_, _ = dec.Token() // }\n\tprogress.Done()\n\n\tif err = dm.validate(); err != nil {\n\t\treturn\n\t}\n\n\tlogger.Infof(\"Dumped counters: %+v\", *dm.Counters)\n\tlogger.Infof(\"Loaded counters: %+v\", *counters)\n\treturn\n}\n\nfunc decodeEntry(dec *json.Decoder, parent Ino, cs *DumpedCounters, parents map[Ino][]Ino, quotas map[Ino]*DumpedQuota,\n\trefs map[chunkKey]int64, bar *utils.Bar, load func(*DumpedEntry), addChunk func(*chunkKey)) (*DumpedEntry, error) {\n\tif _, err := dec.Token(); err != nil {","sourceCodeStart":478,"sourceCodeEnd":514,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/pkg/meta/dump.go#L478-L514","documentation":"Wraps errors from decodeEntry while `juicefs load` replays FSTree or Trash sections of a dump into the metadata engine in pkg/meta/dump.go. The message names the section being loaded plus the underlying error, so failures during entry decoding (bad inode, chunk refs, quota updates) surface here.","triggerScenarios":"`juicefs load` on a dump whose FSTree/Trash entries are inconsistent: unknown chunk keys, invalid inode references, checksum/decode failures inside an entry, or target-engine rejects (e.g. duplicate keys on a non-empty volume).","commonSituations":"Loading a dump into a volume with pre-existing data (key conflicts), cross-version load where the dump format changed, corrupted dump entries.","solutions":["Load into a freshly formatted, empty volume to avoid key conflicts","Fix or re-generate the dump from the source engine; inspect the wrapped error after 'load FSTree:'/'load Trash:' for the root cause","Verify dump/load tool versions match (same JuiceFS release) to avoid format drift"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// before load: confirm target volume is empty and version-compatible\nmeta, _ := juicefs.NewMetaClient(metaURL); if used, _ := meta.GetFormat(ctx); used != nil { /* load into a fresh volume */ }","typeGuard":null,"tryCatchPattern":"if err := juicefsLoad(dumpFile); err != nil { if strings.Contains(err.Error(), \"load FSTree\") || strings.Contains(err.Error(), \"load Trash\") { /* inspect wrapped cause; re-dump or use fresh volume */ } }","preventionTips":["Always load into a newly formatted empty volume","Keep dump/load on the same JuiceFS version","Check the wrapped cause after 'load <section>:' to diagnose the true failure"],"tags":["load","dump","metadata","json"],"backgroundTag":"json-unmarshal-failed","analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}