{"record":{"id":"944eb0a2b95e2531","repo":"apache/seatunnel","slug":"oracle-insert-mode-append-values-requires-auto-com","errorCode":null,"errorMessage":"oracle_insert_mode=APPEND_VALUES requires auto_commit=true.","messagePattern":"oracle_insert_mode=APPEND_VALUES requires auto_commit=true\\.","errorType":"validation","errorClass":"OptionValidationException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/sink/JdbcSinkFactory.java","lineNumber":428,"sourceCode":"        public boolean evaluate(ReadonlyConfig config, JdbcSinkConfig.OracleInsertMode value)\n                throws OptionValidationException {\n            if (value != JdbcSinkConfig.OracleInsertMode.APPEND_VALUES) {\n                return true;\n            }\n            if (config.get(JdbcSinkOptions.USE_COPY_STATEMENT)) {\n                throw new OptionValidationException(\n                        \"oracle_insert_mode=APPEND_VALUES does not support copy statement.\");\n            }\n            if (config.get(JdbcSinkOptions.IS_EXACTLY_ONCE)) {\n                throw new OptionValidationException(\n                        \"oracle_insert_mode=APPEND_VALUES does not support exactly-once.\");\n            }\n            if (!config.get(JdbcSinkOptions.AUTO_COMMIT)) {\n                throw new OptionValidationException(\n                        \"oracle_insert_mode=APPEND_VALUES requires auto_commit=true.\");\n            }\n            if (!config.get(JdbcSinkOptions.GENERATE_SINK_SQL)) {\n                throw new OptionValidationException(\n                        \"oracle_insert_mode=APPEND_VALUES does not support custom query.\");\n            }\n            if (config.get(JdbcSinkOptions.SUPPORT_UPSERT_BY_INSERT_ONLY)) {\n                throw new OptionValidationException(\n                        \"oracle_insert_mode=APPEND_VALUES does not support insert-only upsert.\");\n            }\n            return true;\n        }\n    }\n\n    /**\n     * Submission-time validator for {@code is_exactly_once=true}.\n     *\n     * <p>JDBC XA sink does not support retries; {@code max_retries} must be 0 when exactly-once is\n     * enabled, otherwise duplicates may occur.\n     */\n    static class ExactlyOnceMaxRetriesValidator implements ConditionExtension<Boolean> {\n        @Override","sourceCodeStart":410,"sourceCodeEnd":446,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/sink/JdbcSinkFactory.java#L410-L446","documentation":"The validator requires auto_commit=true when oracle_insert_mode=APPEND_VALUES; otherwise it throws OptionValidationException 'oracle_insert_mode=APPEND_VALUES requires auto_commit=true.' APPEND_VALUES relies on implicit commit semantics and cannot operate with auto-commit disabled.","triggerScenarios":"Sink configured with oracle_insert_mode=\"append_values\" and auto_commit=false (or unset default false in some setups); evaluate() throws at JdbcSinkFactory.java:428.","commonSituations":"Users disabling auto-commit believing it improves consistency; configs copied from exactly-once jobs where auto_commit=false is standard.","solutions":["Set auto_commit=true in the Oracle sink config","Or abandon APPEND_VALUES and pick an insert mode compatible with auto_commit=false"],"exampleFix":"// before\noracle_insert_mode = \"append_values\"\nauto_commit = false\n// after\noracle_insert_mode = \"append_values\"\nauto_commit = true","handlingStrategy":"validation","validationCode":"if (\"append_values\".equalsIgnoreCase(config.get(\"oracle_insert_mode\"))\n    && !Boolean.parseBoolean(String.valueOf(config.getOrDefault(\"auto_commit\", \"false\")))) {\n  throw new IllegalArgumentException(\"auto_commit=true is required for append_values\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  validateSinkOptions(config);\n} catch (OptionValidationException e) {\n  // set auto_commit=true or use a different insert mode\n}","preventionTips":["Set auto_commit=true explicitly when using APPEND_VALUES","Avoid copying auto_commit=false from exactly-once configs","Validate Oracle sink options in CI"],"tags":["jdbc","oracle","config-conflict","autocommit"],"backgroundTag":"conflicting-config-options","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}