{"record":{"id":"2916cdb663408c99","repo":"prestodb/presto","slug":"invalid-arguments-2916cd","errorCode":"INVALID_ARGUMENTS","errorMessage":"Type ConnectorCommitHandle is expected","messagePattern":"Type ConnectorCommitHandle is expected","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-main-base/src/main/java/com/facebook/presto/execution/QueryStateMachine.java","lineNumber":647,"sourceCode":"    }\n\n    private void addSerializedCommitOutputToInputs(List<?> commitHandles)\n    {\n        ImmutableSet.Builder<Input> builder = ImmutableSet.builder();\n\n        for (Input input : inputs.get()) {\n            builder.add(attachSerializedCommitOutput(input, commitHandles));\n        }\n\n        inputs.set(builder.build());\n    }\n\n    private Input attachSerializedCommitOutput(Input input, List<?> commitHandles)\n    {\n        SchemaTableName table = new SchemaTableName(input.getSchema(), input.getTable());\n        for (Object handle : commitHandles) {\n            if (!(handle instanceof ConnectorCommitHandle)) {\n                throw new PrestoException(INVALID_ARGUMENTS, \"Type ConnectorCommitHandle is expected\");\n            }\n\n            ConnectorCommitHandle commitHandle = (ConnectorCommitHandle) handle;\n            if (commitHandle.hasCommitOutput(table)) {\n                return new Input(\n                        input.getConnectorId(),\n                        input.getSchema(),\n                        input.getTable(),\n                        input.getConnectorInfo(),\n                        input.getColumns(),\n                        input.getStatistics(),\n                        Optional.of(commitHandle.getCommitOutputForRead(table)));\n            }\n        }\n        return input;\n    }\n\n    public Map<String, String> getSetSessionProperties()","sourceCodeStart":629,"sourceCodeEnd":665,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-main-base/src/main/java/com/facebook/presto/execution/QueryStateMachine.java#L629-L665","documentation":"Thrown by QueryStateMachine.attachSerializedCommitOutput when deserializing query commit output: an element of the commitHandles list is not an instance of ConnectorCommitHandle. This indicates corrupted or incompatible serialized state being re-attached to inputs during query completion.","triggerScenarios":"Replaying/attaching serialized commit output where a list element fails `handle instanceof ConnectorCommitHandle` — typically deserialized objects from a session/commit payload produced by an incompatible version or a malformed payload.","commonSituations":"Cluster rolling upgrade with mixed Presto versions exchanging serialized commit handles; manually replayed or restored coordinator state; custom connector returning a wrong object type in commit output.","solutions":["Ensure all nodes in the cluster run the same Presto version (complete rolling upgrade)","Discard and re-run the affected query instead of replaying its commit state","If a custom connector is involved, verify it returns ConnectorCommitHandle instances from its commit method"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"if (handles.stream().allMatch(h -> h instanceof ConnectorCommitHandle)) {\n    stateMachine.attachSerializedCommitOutput(input, handles);\n}","typeGuard":"boolean isCommitHandle(Object o) { return o instanceof ConnectorCommitHandle; }","tryCatchPattern":"try { attachSerializedCommitOutput(input, handles); } catch (PrestoException e) { if (e.getErrorCode().getCode() == StandardErrorCode.INVALID_ARGUMENTS.toErrorCodeCode()) { /* drop corrupted state; re-run query */ } throw e; }","preventionTips":["Keep the cluster on a single Presto version, especially across rolling upgrades","Never hand-edit or partially restore serialized query/session state","In custom connectors, always return ConnectorCommitHandle from commit APIs"],"tags":["presto","serialization","commit-handle","internal"],"backgroundTag":"incompatible-serialized-state","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"}