{"record":{"id":"f84dded7180d8a98","repo":"linera-io/linera-protocol","slug":"not-possible-to-work-with-memory","errorCode":null,"errorMessage":"Not possible to work with memory","messagePattern":"Not possible to work with memory","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"linera-service/src/cli/net_up_utils.rs","lineNumber":86,"sourceCode":"            #[cfg(not(feature = \"storage-service\"))]\n            Some(storage) => {\n                let config = StorageConfig::from_str(storage)?;\n                Ok(StorageConfigProvider { config })\n            }\n        }\n    }\n\n    pub fn inner_storage_config(&self) -> &InnerStorageConfig {\n        &self.config.inner_storage_config\n    }\n\n    pub fn namespace(&self) -> &str {\n        &self.config.namespace\n    }\n\n    pub fn database(&self) -> anyhow::Result<Database> {\n        match self.config.inner_storage_config {\n            InnerStorageConfig::Memory { .. } => anyhow::bail!(\"Not possible to work with memory\"),\n            #[cfg(feature = \"rocksdb\")]\n            InnerStorageConfig::RocksDb { .. } => {\n                anyhow::bail!(\"Not possible to work with RocksDB\")\n            }\n            #[cfg(feature = \"storage-service\")]\n            InnerStorageConfig::Service { .. } => Ok(Database::Service),\n            #[cfg(feature = \"scylladb\")]\n            InnerStorageConfig::ScyllaDb { .. } => Ok(Database::ScyllaDb),\n            #[cfg(all(feature = \"rocksdb\", feature = \"scylladb\"))]\n            InnerStorageConfig::DualRocksDbScyllaDb { .. } => Ok(Database::DualRocksDbScyllaDb),\n        }\n    }\n}\n\n/// Starts a local test network and, optionally, a faucet and block exporter.\n#[expect(clippy::too_many_arguments)]\npub async fn handle_net_up_service(\n    num_other_initial_chains: u32,","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/linera-io/linera-protocol/blob/6c226ddcb332ef55118dc8d0aafbd093d5420899/linera-service/src/cli/net_up_utils.rs#L68-L104","documentation":"`StorageConfigProvider::database()` (used by `linera net up`) maps the configured storage backend to a shared `Database` kind for the local test network. In-memory storage is rejected because a local net spawns several separate server processes (validators, proxies, exporter) that must share persisted state — a process-local in-memory store cannot be shared, so the `InnerStorageConfig::Memory` arm bails immediately.","triggerScenarios":"Running `linera net up --storage memory...` — any storage config string that parses to `InnerStorageConfig::Memory`.","commonSituations":"Copying a `--storage memory` flag from single-process unit-test invocations into `net up`; defaulting configs to memory for speed; leftover scripts from memory-compatible commands.","solutions":["Use a shared backend: `--storage scylladb:...` or `--storage service:<endpoint>`","Omit `--storage` entirely so net up auto-starts a storage-service instance (with the storage-service feature compiled in)","Keep memory storage for single-process tests only, never for multi-process local nets"],"exampleFix":"# before\nlinera net up --storage memory: --other-flags ...\n\n# after\nlinera net up --storage service:127.0.0.1:12345 --other-flags ...","handlingStrategy":"validation","validationCode":"// Reject memory storage before starting a local net.\nif matches!(storage_config.inner_storage_config, InnerStorageConfig::Memory { .. }) {\n    anyhow::bail!(\"net up requires a shared backend (service/scylladb); memory cannot be shared across validator processes\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Reserve `--storage memory` for single-process unit tests; never carry it into net up invocations","Default your scripts to `--storage scylladb:...` or omit --storage to use the auto-started storage service","Remember the accepted set: service, scylladb, or dual rocksdb+scylladb"],"tags":["storage","memory","local-net","linera-cli"],"backgroundTag":"unsupported-storage-backend","analyzedSha":"6c226ddcb332ef55118dc8d0aafbd093d5420899","analyzedAt":"2026-08-22T22:49:09.787Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}