{"record":{"id":"6c51e1d18f06d337","repo":"influxdata/influxdb","slug":"database-not-found-db-name-mod","errorCode":null,"errorMessage":"database not found {db_name:?}","messagePattern":"database not found (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"influxdb3_write/src/write_buffer/mod.rs","lineNumber":101,"sourceCode":"    #[error(\"catalog update error: {0}\")]\n    CatalogUpdateError(#[from] CatalogError),\n\n    #[error(\"error from persister: {0}\")]\n    PersisterError(#[from] PersisterError),\n\n    #[error(\"corrupt load state: {0}\")]\n    CorruptLoadState(String),\n\n    #[error(\"database name error: {0}\")]\n    DatabaseNameError(#[from] DatabaseNameError),\n\n    #[error(\"error from table buffer: {0}\")]\n    TableBufferError(#[from] table_buffer::Error),\n\n    #[error(\"error in last cache: {0}\")]\n    LastCacheError(#[from] last_cache::Error),\n\n    #[error(\"database not found {db_name:?}\")]\n    DatabaseNotFound { db_name: String },\n\n    #[error(\"table not found {table_name:?} in db {db_name:?}\")]\n    TableNotFound { db_name: String, table_name: String },\n\n    #[error(\"tried accessing database that does not exist\")]\n    DbDoesNotExist,\n\n    #[error(\"tried creating database named '{0}' that already exists\")]\n    DatabaseExists(String),\n\n    #[error(\"cannot write to soft-deleted database '{0}' - it is marked for deletion\")]\n    DatabaseDeleted(String),\n\n    #[error(\"tried accessing table that do not exist\")]\n    TableDoesNotExist,\n\n    #[error(\"table '{db_name}.{table_name}' already exists\")]","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_write/src/write_buffer/mod.rs#L83-L119","documentation":"Indicates a write or operation referenced a database that does not exist in this server's catalog. The `db_name` field names the missing database. InfluxDB 3 generally requires databases to be created (explicitly or via configured auto-creation behavior) before writes succeed.","triggerScenarios":"Calling the write API (e.g. write_lp / line-protocol write) with a database name that has never been created, was deleted (including soft-deleted), or is misspelled relative to the catalog.","commonSituations":"Typo in the bucket/database name in a Telegraf or client config; pointing a client at the wrong influxdb3 instance/environment; the database was deleted by another operator; switching from InfluxDB 1.x bucket names.","solutions":["Check existing databases (e.g. via the catalog/`show databases` equivalent) and correct the name","Create the database explicitly before writing","Verify the client is pointed at the intended server/environment"],"exampleFix":"// before\nclient.write(\"metrics-prod\", lp)?; // typo\n// after\nlet db = \"metrics-prod\";\nif !database_exists(db)? {\n    create_database(db)?;\n}\nclient.write(db, lp)?;","handlingStrategy":"validation","validationCode":"// before writing\nif !databases().await?.iter().any(|d| d == db_name) {\n    create_database(db_name).await?;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Centralize database names in config, not hardcoded literals in clients","Add a startup check that all target databases exist","Alert on DatabaseNotFound writes to catch client misconfiguration early","Watch for database deletions by other operators"],"tags":["database","not-found","influxdb"],"backgroundTag":"entity-not-found","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}