{"record":{"id":"b27ea371eb694a28","repo":"linera-io/linera-protocol","slug":"for-dualrocksdbscylladb-the-formatting-has-to-be","errorCode":null,"errorMessage":"For DualRocksDbScyllaDb, the formatting has to be dualrocksdbscylladb:directory:mode:tcp:hostname:port:namespace","messagePattern":"For DualRocksDbScyllaDb, the formatting has to be dualrocksdbscylladb:directory:mode:tcp:hostname:port:namespace","errorType":"validation","errorClass":"anyhow","httpStatus":null,"severity":"error","filePath":"linera-storage-runtime/src/storage_config.rs","lineNumber":228,"sourceCode":"                            bail!(\"the entry \\\"{part}\\\" is not matching\");\n                        }\n                    }\n                }\n            }\n            let uri = uri.unwrap_or_else(|| \"localhost:9042\".to_string());\n            let namespace = namespace.unwrap_or_else(|| DEFAULT_NAMESPACE.to_string());\n            let inner_storage_config = InnerStorageConfig::ScyllaDb { uri };\n            debug!(\"ScyllaDB connection info: {:?}\", inner_storage_config);\n            return Ok(StorageConfig {\n                inner_storage_config,\n                namespace,\n            });\n        }\n        #[cfg(all(feature = \"rocksdb\", feature = \"scylladb\"))]\n        if let Some(s) = input.strip_prefix(DUAL_ROCKS_DB_SCYLLA_DB) {\n            let parts = s.split(':').collect::<Vec<_>>();\n            if parts.len() != 5 && parts.len() != 6 {\n                bail!(\n                    \"For DualRocksDbScyllaDb, the formatting has to be dualrocksdbscylladb:directory:mode:tcp:hostname:port:namespace\"\n                );\n            }\n            let path = Path::new(parts[0]);\n            let path = path.to_path_buf();\n            let path_with_guard = PathWithGuard::new(path);\n            let spawn_mode_name = parts\n                .get(1)\n                .copied()\n                .expect(\"validated by the parts length check above\");\n            let spawn_mode = match spawn_mode_name {\n                \"spawn_blocking\" => Ok(RocksDbSpawnMode::SpawnBlocking),\n                \"block_in_place\" => Ok(RocksDbSpawnMode::BlockInPlace),\n                \"runtime\" => Ok(RocksDbSpawnMode::get_spawn_mode_from_runtime()),\n                _ => Err(anyhow!(\"Failed to parse {spawn_mode_name} as a spawn_mode\",)),\n            }?;\n            let protocol = parts[2];\n            if protocol != \"tcp\" {","sourceCodeStart":210,"sourceCodeEnd":246,"githubUrl":"https://github.com/linera-io/linera-protocol/blob/6c226ddcb332ef55118dc8d0aafbd093d5420899/linera-storage-runtime/src/storage_config.rs#L210-L246","documentation":"Raised while parsing a `dualrocksdbscylladb:` storage configuration in `StorageConfig::from_str` (linera-storage-runtime, rocksdb+scylladb features). After the prefix, the remainder is split on ':' and must yield exactly 5 parts (directory:mode:tcp:host:port) or 6 parts (plus namespace); any other count bails with the expected format in the message.","triggerScenarios":"Passing `dualrocksdbscylladb:/db` (missing mode/uri segments), or a string with 7+ segments from an extra colon; IPv6 hosts or colon-containing paths breaking the segment count.","commonSituations":"Hand-assembling the dual-backend string and forgetting the mode or the tcp:host:port tail; copy-pasting from a rocksdb-only config and appending scylla parts incorrectly.","solutions":["Use the exact form `dualrocksdbscylladb:<directory>:<mode>:tcp:<host>:<port>[:<namespace>]`, e.g. `dualrocksdbscylladb:/tmp/db:block_in_place:tcp:127.0.0.1:9042:table_ns`","Count the segments — the tcp URI must be split as `tcp`, `host`, `port` (three segments)","Remove extra colon-separated segments"],"exampleFix":"# before\n--storage dualrocksdbscylladb:/tmp/db:tcp:127.0.0.1:9042\n\n# after\n--storage dualrocksdbscylladb:/tmp/db:block_in_place:tcp:127.0.0.1:9042:table_ns","handlingStrategy":"validation","validationCode":"// Rust: pre-validate a dualrocksdbscylladb string before FromStr\nfn is_valid_dual_config(s: &str) -> bool {\n    match s.strip_prefix(\"dualrocksdbscylladb:\") {\n        Some(rest) => {\n            let n = rest.split(':').count();\n            n == 5 || n == 6\n        }\n        None => false,\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Memorize the layout: directory : mode : tcp : host : port [: namespace] — 5 or 6 segments","Beware IPv6 literals and colon-containing paths, which break the segment count"],"tags":["config","parsing","rocksdb","scylladb","linera-storage"],"backgroundTag":"connection-string-parse-error","analyzedSha":"6c226ddcb332ef55118dc8d0aafbd093d5420899","analyzedAt":"2026-08-22T22:49:09.787Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}