{"record":{"id":"2e480196cb7de3bb","repo":"apache/seatunnel","slug":"failed-to-get-clickhouse-server-config","errorCode":null,"errorMessage":"Failed to get clickhouse server config: {}","messagePattern":"Failed to get clickhouse server config: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/client/ClickhouseSinkWriter.java","lineNumber":230,"sourceCode":"\n    private boolean clickhouseServerEnableExperimentalLightweightDelete(\n            ClickHouseConnectionImpl clickhouseConnection) {\n        if (!option.isAllowExperimentalLightweightDelete()) {\n            return false;\n        }\n        String configKey = \"allow_experimental_lightweight_delete\";\n        try (Statement stmt = clickhouseConnection.createStatement();\n                ResultSet resultSet =\n                        stmt.executeQuery(\"SHOW SETTINGS ILIKE '%\" + configKey + \"%'\")) {\n            while (resultSet.next()) {\n                String name = resultSet.getString(\"name\");\n                if (name.equalsIgnoreCase(configKey)) {\n                    return resultSet.getBoolean(\"value\");\n                }\n            }\n            return false;\n        } catch (SQLException e) {\n            log.warn(\"Failed to get clickhouse server config: {}\", configKey, e);\n            return false;\n        }\n    }\n}\n","sourceCodeStart":212,"sourceCodeEnd":235,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/client/ClickhouseSinkWriter.java#L212-L235","documentation":"ClickhouseSinkWriter checks whether the ClickHouse server has the experimental lightweight delete feature enabled by querying system tables (SELECT value FROM system.<config>). On SQLException it logs this warning and returns false, so the writer proceeds assuming lightweight delete is disabled.","triggerScenarios":"clickhouseServerEnableExperimentalLightweightDelete executes its config query and the JDBC statement fails — table missing on old ClickHouse versions, connection drop, or permission denied on system tables.","commonSituations":"ClickHouse versions without the checked system table; limited DB user lacking access to system.* tables; transient network issues between SeaTunnel and ClickHouse.","solutions":["Grant the configured ClickHouse user read access to system tables, or check the exact SQLException in the log cause.","Upgrade ClickHouse if the required config table/feature is absent but lightweight delete is desired.","Accept the fallback (feature treated as disabled) if your sink config does not rely on lightweight delete."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// pre-check feature flag before writing\nSELECT value FROM system.system_settings WHERE name = 'enable_experimental_lightweight_delete';","typeGuard":null,"tryCatchPattern":"try {\n    boolean enabled = writer.checkLightweightDelete();\n} catch (SQLException e) {\n    // connector already falls back to false; log and continue\n}","preventionTips":["Grant the sink user read access to system tables","Test the feature-flag query against your ClickHouse version during setup"],"tags":["clickhouse","jdbc","sql","system-table","fallback"],"backgroundTag":"sql-query-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}