{"record":{"id":"ef9c619af2899c71","repo":"prestodb/presto","slug":"invalid-session-property-ef9c61","errorCode":"INVALID_SESSION_PROPERTY","errorMessage":"Unknown connector ","messagePattern":"Unknown connector ","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-main-base/src/main/java/com/facebook/presto/metadata/SessionPropertyManager.java","lineNumber":261,"sourceCode":"        connectorSessionProperties.remove(connectorId);\n    }\n\n    public Optional<PropertyMetadata<?>> getSystemSessionPropertyMetadata(String name)\n    {\n        requireNonNull(name, \"name is null\");\n        if (systemSessionProperties.get(name) == null) {\n            return Optional.ofNullable(memoizedWorkerSessionProperties.get().get(name));\n        }\n        return Optional.ofNullable(systemSessionProperties.get(name));\n    }\n\n    public Optional<PropertyMetadata<?>> getConnectorSessionPropertyMetadata(ConnectorId connectorId, String propertyName)\n    {\n        requireNonNull(connectorId, \"connectorId is null\");\n        requireNonNull(propertyName, \"propertyName is null\");\n        Map<String, PropertyMetadata<?>> properties = connectorSessionProperties.get(connectorId);\n        if (properties == null || properties.isEmpty()) {\n            throw new PrestoException(INVALID_SESSION_PROPERTY, \"Unknown connector \" + connectorId);\n        }\n\n        return Optional.ofNullable(properties.get(propertyName));\n    }\n\n    private Map<String, PropertyMetadata<?>> getWorkerSessionProperties()\n    {\n        List<PropertyMetadata<?>> workerSessionPropertiesList = workerSessionPropertyProviders.values().stream()\n                .flatMap(manager -> manager.getSessionProperties().stream())\n                .collect(toImmutableList());\n        Map<String, PropertyMetadata<?>> workerSessionProperties = new ConcurrentHashMap<>();\n        workerSessionPropertiesList.forEach(sessionProperty -> {\n            requireNonNull(sessionProperty, \"sessionProperty is null\");\n            // TODO: Implement fail fast in case of duplicate entries.\n            workerSessionProperties.put(sessionProperty.getName(), sessionProperty);\n        });\n        return workerSessionProperties;\n    }","sourceCodeStart":243,"sourceCodeEnd":279,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-main-base/src/main/java/com/facebook/presto/metadata/SessionPropertyManager.java#L243-L279","documentation":"INVALID_SESSION_PROPERTY PrestoException thrown by SessionPropertyManager.getConnectorSessionPropertyMetadata when no session-property metadata is registered for the given ConnectorId. The manager keeps a map connectorId -> properties; a null or empty map means the connector is unknown to the session property manager, so any lookup for its properties fails.","triggerScenarios":"Calling getConnectorSessionPropertyMetadata (directly or via property()/propertyMetadata()) with a ConnectorId that was never registered via addConnectorSessionProperties, or a connectorId that was removed/renamed (e.g. after catalog redeploy with a new versioned connector id).","commonSituations":"Accessing session properties of a catalog that failed to start or was dropped; stale cached ConnectorId from before a coordinator restart; catalogs configured on workers but not registered on the coordinator path executing the code.","solutions":["Verify the catalog is configured and loaded on the coordinator (check catalog config properties files)","Use the current ConnectorId for the catalog (connector ids may be versioned, e.g. catalog@version)","Register the connector's session properties via addConnectorSessionProperties before querying them","Restart the cluster/coordinator after adding the catalog so property metadata is registered"],"exampleFix":"// before\nPropertyMetadata<?> p = sessionPropertyManager.getConnectorSessionPropertyMetadata(new ConnectorId(\"mycat\"), \"prop\");\n// after\nConnectorId id = metadata.getCatalogHandle(session, \"mycat\").orElseThrow(...);\nOptional<PropertyMetadata<?>> p = sessionPropertyManager.getConnectorSessionPropertyMetadata(id, \"prop\"); // after addConnectorSessionProperties(id, ...)","handlingStrategy":"validation","validationCode":"// Verify the catalog exists before touching its session properties\nif (!metadata.getCatalogHandle(session, catalogName).isPresent()) {\n    throw new IllegalArgumentException(\"Unknown catalog: \" + catalogName);\n}","typeGuard":"boolean connectorKnown(SessionPropertyManager m, ConnectorId id) {\n    try { return !m.getConnectorSessionProperties(id).isEmpty(); }\n    catch (PrestoException e) { return false; }\n}","tryCatchPattern":"try {\n    Optional<PropertyMetadata<?>> p = manager.getConnectorSessionPropertyMetadata(connectorId, name);\n} catch (PrestoException e) {\n    if (e.getErrorCode().getCode() == StandardErrorCode.INVALID_SESSION_PROPERTY.getCode()) {\n        // re-fetch the ConnectorId via metadata.getCatalogHandle or check catalog config\n    } else { throw e; }\n}","preventionTips":["Confirm the catalog's properties file exists on the coordinator before use","Re-resolve ConnectorId after coordinator restarts (ids can be versioned)","Never cache ConnectorId across deployments","Register connector session properties at plugin/catalog initialization"],"tags":["presto","session-properties","connector","configuration"],"backgroundTag":"unknown-connector","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"}