{"record":{"id":"7d604a9c4136edd6","repo":"apache/shardingsphere","slug":"rowupdated-7d604a","errorCode":null,"errorMessage":"rowUpdated","messagePattern":"rowUpdated","errorType":"exception","errorClass":"SQLFeatureNotSupportedException","httpStatus":null,"severity":"error","filePath":"kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/resultset/AbstractUnsupportedOperationSQLFederationResultSet.java","lineNumber":135,"sourceCode":"    \n    @Override\n    public final void moveToInsertRow() throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"moveToInsertRow\");\n    }\n    \n    @Override\n    public final void moveToCurrentRow() throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"moveToCurrentRow\");\n    }\n    \n    @Override\n    public final boolean rowInserted() throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"rowInserted\");\n    }\n    \n    @Override\n    public final boolean rowUpdated() throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"rowUpdated\");\n    }\n    \n    @Override\n    public final boolean rowDeleted() throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"rowDeleted\");\n    }\n    \n    @Override\n    public final String getCursorName() throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"getCursorName\");\n    }\n    \n    @Override\n    public final int getHoldability() throws SQLException {\n        throw new SQLFeatureNotSupportedException(\"getHoldability\");\n    }\n    \n    @Override","sourceCodeStart":117,"sourceCodeEnd":153,"githubUrl":"https://github.com/apache/shardingsphere/blob/e952770a215630a3659c75d64369168cd3e26b82/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/resultset/AbstractUnsupportedOperationSQLFederationResultSet.java#L117-L153","documentation":"rowUpdated() throws SQLFeatureNotSupportedException in the federation ResultSet. The method reports whether the current row has been visibly updated (own-updates-detected mode); federation result sets are read-only snapshots, so no update visibility model exists and every call is rejected (the method is final).","triggerScenarios":"Calling rs.rowUpdated() during iteration of a federated ResultSet — change-visibility branch logic such as if (rs.rowUpdated()) { reload row; }.","commonSituations":"Concurrency-aware GUIs or caches that refresh rows they detect as updated; code ported from drivers whose result sets support updates-visible semantics; enabling sql-federation on an existing ShardingSphere datasource and hitting this in shared iteration utilities.","solutions":["Detect external updates with an optimistic-locking column (version/updated_at) compared against your snapshot instead of rowUpdated()","Track your own UPDATE statements in application state if the goal is to skip self-modified rows","Audit shared iteration utilities for the row*Inserted/Updated/Deleted visibility calls before enabling federation"],"exampleFix":"// before\nwhile (rs.next()) { if (rs.rowUpdated()) { refresh(rs); } }\n\n// after\nwhile (rs.next()) {\n    if (rs.getLong(\"version\") != snapshotVersion(rs.getLong(\"id\"))) { refresh(rs); }\n}","handlingStrategy":"try-catch","validationCode":"try { rs.rowUpdated(); /* supported */ }\ncatch (final SQLFeatureNotSupportedException e) { /* visibility unsupported: compare version columns instead */ }","typeGuard":"private boolean isFederationVisibilitySupported(final ResultSet rs) {\n    return rs.getClass().getName().startsWith(\"org.apache.shardingsphere.sqlfederation\") == false;\n}","tryCatchPattern":"boolean updated;\ntry { updated = rs.rowUpdated(); }\ncatch (final SQLFeatureNotSupportedException e) { updated = rs.getLong(\"version\") > snapshotVersion(id); }","preventionTips":["Use version/updated_at columns for concurrency detection","Cache snapshots and diff explicitly","Remove rowUpdated() from generic iteration utilities"],"tags":["jdbc","resultset","sql-federation","visibility","shardingsphere"],"backgroundTag":null,"analyzedSha":"e952770a215630a3659c75d64369168cd3e26b82","analyzedAt":"2026-08-14T13:54:53.392Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}