{"record":{"id":"8ef2eb45450cd2fb","repo":"prestodb/presto","slug":"unsupported-isolation-level","errorCode":"UNSUPPORTED_ISOLATION_LEVEL","errorMessage":"Connector supported isolation level %s does not meet requested isolation level %s","messagePattern":"Connector supported isolation level (.+?) does not meet requested isolation level (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-spi/src/main/java/com/facebook/presto/spi/transaction/IsolationLevel.java","lineNumber":75,"sourceCode":"        this.value = value;\n    }\n\n    @ThriftEnumValue\n    public int getValue()\n    {\n        return value;\n    }\n\n    @Override\n    public String toString()\n    {\n        return name().replace('_', ' ');\n    }\n\n    public static void checkConnectorSupports(IsolationLevel supportedLevel, IsolationLevel requestedLevel)\n    {\n        if (!supportedLevel.meetsRequirementOf(requestedLevel)) {\n            throw new PrestoException(UNSUPPORTED_ISOLATION_LEVEL, format(\"Connector supported isolation level %s does not meet requested isolation level %s\", supportedLevel, requestedLevel));\n        }\n    }\n}\n","sourceCodeStart":57,"sourceCodeEnd":79,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-spi/src/main/java/com/facebook/presto/spi/transaction/IsolationLevel.java#L57-L79","documentation":"IsolationLevel.checkConnectorSupports verifies the connector's advertised isolation level satisfies the transaction's requested level. If it does not (e.g. connector only supports READ_COMMITTED but SERIALIZABLE was requested), it throws UNSUPPORTED_ISOLATION_LEVEL.","triggerScenarios":"Starting/using a transaction whose requested isolation level exceeds what the connector declares in connectorMetadata support calls, e.g. BEGIN ISOLATION LEVEL SERIALIZABLE against a READ_COMMITTED-only connector.","commonSituations":"Clients specifying SERIALIZABLE/REPEATABLE_READ against connectors (like early Kafka or simple catalog connectors) that only support READ_COMMITTED or READ_UNCOMMITTED.","solutions":["Lower the session's transaction isolation level to one the connector supports","Remove the isolation-level requirement (use auto-commit) if the connector cannot elevate","Add real transaction support to the connector and declare the higher level","Check connector documentation for supported isolation levels"],"exampleFix":"// before\nSTART TRANSACTION ISOLATION LEVEL SERIALIZABLE;\n// after\nSTART TRANSACTION ISOLATION LEVEL READ COMMITTED;","handlingStrategy":"try-catch","validationCode":"IsolationLevel supported = connectorMetadata.supportsIsolationLevel(...); if (!supported.meetsRequirementOf(requestedLevel)) { requestedLevel = IsolationLevel.READ_COMMITTED; }","typeGuard":null,"tryCatchPattern":"try { startTransaction(requestedLevel); } catch (PrestoException e) { if (e.getErrorCode().getCode() == StandardErrorCode.UNSUPPORTED_ISOLATION_LEVEL.toErrorCode().getCode()) { startTransaction(IsolationLevel.READ_COMMITTED); } else { throw e; } }","preventionTips":["Check connector docs for supported isolation levels before transactions","Default session isolation to READ_COMMITTED","Avoid SERIALIZABLE with connectors lacking MVCC support"],"tags":["transactions","isolation-level","connector","spi"],"backgroundTag":"unsupported-isolation-level","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}