{"record":{"id":"8e09f449e53aaf0d","repo":"influxdata/influxdb","slug":"table-not-found-table-name-in-db-db-name","errorCode":null,"errorMessage":"table not found {table_name:?} in db {db_name:?}","messagePattern":"table not found (.+?) in db (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"influxdb3_write/src/write_buffer/mod.rs","lineNumber":104,"sourceCode":"    #[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\")]\n    TableAlreadyExists {\n        db_name: Arc<str>,\n        table_name: Arc<str>,","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_write/src/write_buffer/mod.rs#L86-L122","documentation":"Indicates an operation referenced a table that does not exist in the named database. The `db_name` and `table_name` fields identify the missing table. Writes only succeed for tables that already exist (or whose creation the server is configured to allow implicitly).","triggerScenarios":"Writing line protocol whose measurement does not match any existing table in the target database; querying/deleting against a table name that was dropped or renamed; measurement name casing/whitespace mismatch.","commonSituations":"Renamed measurements in a producer after tables were created; line-protocol measurement with trailing whitespace or different casing; table dropped by a schema cleanup; writes sent to the wrong database.","solutions":["List the tables in the target database and correct the measurement name","Create the table explicitly (or send one write to establish it if auto-creation is enabled)","Check the producer's measurement name for casing/whitespace mismatches"],"exampleFix":"// before\nwrite_lp(\"sensors\", \"Temperture value=1\", false)?; // typo in measurement\n// after\nlet table = \"Temperature\";\nassert!(table_exists(\"sensors\", table)?, \"create table {table} first\");\nwrite_lp(\"sensors\", &format!(\"{table} value=1\"), false)?;","handlingStrategy":"validation","validationCode":"// before writing line protocol\nlet measurement = lp.split(',').next().unwrap().split(' ').next().unwrap();\nassert!(tables(db)?.iter().any(|t| t == measurement),\n        \"table {measurement:?} missing in {db}; create it first\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Version-control measurement names shared between producers and schema setup","Trim measurement names in producers; enforce consistent casing","Re-create tables after schema cleanup jobs","Write a smoke-test write per table in CI against a dev instance"],"tags":["table","not-found","schema","influxdb"],"backgroundTag":"record-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"}