{"record":{"id":"8e26e5ed73b73a99","repo":"risingwavelabs/risingwave","slug":"the-source-object-store-does-not-appear-to-be-lega","errorCode":null,"errorMessage":"the source object store does not appear to be legacy: {} versus {}","messagePattern":"the source object store does not appear to be legacy: (.+?) versus (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/ctl/src/cmd_impl/hummock/migrate_legacy_object.rs","lineNumber":86,"sourceCode":"        {\n            let legacy_path = object.key;\n            assert_eq!(\n                &legacy_path[..source_dir.len()],\n                source_dir,\n                \"{legacy_path} versus {source_dir}\"\n            );\n            if legacy_path.ends_with('/') {\n                tracing::warn!(legacy_path, \"skip directory\");\n                continue;\n            }\n            let new_path = format!(\"{}{}\", target_dir, &legacy_path[source_dir.len()..]);\n            from_to.push((legacy_path, new_path));\n        } else {\n            let object_id = get_object_id_from_path(&object.key);\n            let legacy_prefix = get_object_prefix(object_id.as_raw().as_raw_id(), false);\n            let legacy_path = get_object_data_path(&legacy_prefix, source_dir, object_id);\n            if object.key != legacy_path {\n                return Err(anyhow!(format!(\n                    \"the source object store does not appear to be legacy: {} versus {}\",\n                    object.key, legacy_path\n                )));\n            }\n            let new_path = get_object_data_path(\n                &get_object_prefix(object_id.as_raw().as_raw_id(), true),\n                target_dir,\n                object_id,\n            );\n            from_to.push((legacy_path, new_path));\n        }\n        count += 1;\n        if from_to.len() >= concurrency as usize {\n            copy(std::mem::take(&mut from_to).into_iter(), opendal.inner()).await?;\n        }\n    }\n    if !from_to.is_empty() {\n        copy(from_to.into_iter(), opendal.inner()).await?;","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/ctl/src/cmd_impl/hummock/migrate_legacy_object.rs#L68-L104","documentation":"While listing objects under source_dir, the tool derives the expected legacy path for each object and compares it with the actual key. A mismatch means the store contains objects that do not match the legacy naming scheme, so a mechanical migration would be unsafe.","triggerScenarios":"The listed object's key equals neither the new-prefix path nor the recomputed legacy path — e.g. partially migrated store, hand-copied objects, or objects from a different prefix scheme inside source_dir.","commonSituations":"Re-running migration after a partial run; mixing old/new object prefixes in one directory; pointing source_dir at a directory containing unrelated objects.","solutions":["Inspect the two reported paths to identify the offending object and remove/move it if it does not belong","Resume a partial migration from where it stopped instead of re-listing mixed content","Ensure source_dir points only at the legacy object directory","Verify which prefix strategy (new vs legacy) the objects actually use before migrating"],"exampleFix":"null","handlingStrategy":"validation","validationCode":"let expected = get_object_data_path(&get_object_prefix(id.as_raw().as_raw_id(), false), source_dir, &object_id);\nif listed_key != expected {\n    eprintln!(\"non-legacy object found: {} (expected {})\", listed_key, expected);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run migration exactly once and track completion state","Point source_dir at a directory containing only legacy objects","Inspect listing output for unexpected keys before converting"],"tags":["object-store","migration","naming-scheme","validation"],"backgroundTag":"unexpected-response-shape","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}