{"record":{"id":"228b9fc15226a575","repo":"risingwavelabs/risingwave","slug":"invalid-value-for-is-exactly-once-expected-tru-228b9f","errorCode":null,"errorMessage":"invalid value for `is_exactly_once`: expected `true` or `false`, got `{value}`","messagePattern":"invalid value for `is_exactly_once`: expected `true` or `false`, got `(.+?)`","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/lancedb.rs","lineNumber":181,"sourceCode":"}\n\nimpl LanceDbSink {\n    pub fn new(config: LanceDbConfig, param: SinkParam) -> Result<Self> {\n        Ok(Self { config, param })\n    }\n}\n\nimpl Sink for LanceDbSink {\n    type LogSinker = CoordinatedLogSinker<LanceDbSinkWriter>;\n\n    const SINK_NAME: &'static str = LANCEDB_SINK;\n\n    fn is_exactly_once(properties: &BTreeMap<String, String>) -> Result<bool> {\n        let Some(value) = properties.get(\"is_exactly_once\") else {\n            return Ok(true);\n        };\n        value.parse::<bool>().map_err(|_| {\n            SinkError::Config(anyhow!(\n                \"invalid value for `is_exactly_once`: expected `true` or `false`, got `{value}`\"\n            ))\n        })\n    }\n\n    async fn new_log_sinker(&self, writer_param: SinkWriterParam) -> Result<Self::LogSinker> {\n        let inner = LanceDbSinkWriter::new(self.config.clone(), self.param.schema()).await?;\n\n        let commit_checkpoint_interval =\n            NonZeroU64::new(self.config.common.commit_checkpoint_interval).expect(\n                \"commit_checkpoint_interval should be greater than 0, and it should be checked in config validation\",\n            );\n\n        let writer = CoordinatedLogSinker::new(\n            &writer_param,\n            self.param.clone(),\n            inner,\n            commit_checkpoint_interval,","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/lancedb.rs#L163-L199","documentation":"Parser guard in Sink::is_exactly_once for the LanceDB sink: the `is_exactly_once` property, when present, must parse as a boolean literal `true` or `false`. Any other string (e.g. `1`, `yes`, `TRUE` with wrong casing) is rejected with this config error; absent property defaults to true.","triggerScenarios":"CREATE SINK ... WITH ('is_exactly_once' = 'yes') or any value other than the literal strings 'true'/'false'.","commonSituations":"Users passing '1'/'0', 'True'/'False' (capitalized), 'yes'/'no', or accidentally quoting the value twice.","solutions":["Set 'is_exactly_once' = 'true' or 'false' (lowercase literals)","Remove the option entirely to accept the default (true)","Check for stray quotes or whitespace around the value"],"exampleFix":"// before\nWITH ('is_exactly_once' = 'True')\n// after\nWITH ('is_exactly_once' = 'true')","handlingStrategy":"validation","validationCode":"function checkExactlyOnce(v) {\n  if (v !== undefined && v !== 'true' && v !== 'false')\n    throw new Error(`is_exactly_once must be 'true' or 'false', got '${v}'`);\n}","typeGuard":null,"tryCatchPattern":"catch (SinkError::Config(e)) if e.contains(\"is_exactly_once\") { fix the WITH clause value to a lowercase boolean literal }","preventionTips":["Always use lowercase 'true'/'false' for boolean connector options","Omit the option rather than passing 'yes'/'1'","Avoid double-quoting values in SQL WITH clauses"],"tags":["rust","config","boolean-parsing"],"backgroundTag":"invalid-config-value","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}