You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/11/15 13:09:29 UTC

[GitHub] [shardingsphere] penghuazhou opened a new issue #13625: org.postgresql.jdbc.PgDatabaseMetaData.getRowIdLifetime() 方法尚未被实作

penghuazhou opened a new issue #13625:
URL: https://github.com/apache/shardingsphere/issues/13625


   version: shardingshpere-proxy 5.0.0, It have an error when start up, but it can start up sucess, so if will effect to use sharingshpere-proxy or not?
   
   [DEBUG] 2021-11-15 20:52:30.830 [grpc-default-worker-ELG-1-2] io.grpc.netty.NettyClientHandler - [id: 0x8e13bf48, L:/127.0.0.1:63242 - R:localhost/127.0.0.1:2379] INBOUND HEADERS: streamId=33 headers=GrpcHttp2ResponseHeaders[grpc-status: 0, grpc-message: ] padding=0 endStream=true
   [WARN ] 2021-11-15 20:52:30.863 [main] c.zaxxer.hikari.pool.ProxyConnection - HikariPool-1 - Connection org.postgresql.jdbc.PgConnection@162b3d47 marked as broken because of SQLSTATE(0A000), ErrorCode(0)
   java.sql.SQLFeatureNotSupportedException: 这个 org.postgresql.jdbc.PgDatabaseMetaData.getRowIdLifetime() 方法尚未被实作。
           at org.postgresql.Driver.notImplemented(Driver.java:688)
           at org.postgresql.jdbc.PgDatabaseMetaData.getRowIdLifetime(PgDatabaseMetaData.java:2562)
           at com.zaxxer.hikari.pool.HikariProxyDatabaseMetaData.getRowIdLifetime(HikariProxyDatabaseMetaData.java)
           at org.apache.shardingsphere.infra.metadata.resource.CachedDatabaseMetaData.getRowIdLifetimeFromOriginMetaData(CachedDatabaseMetaData.java:437)
           at org.apache.shardingsphere.infra.metadata.resource.CachedDatabaseMetaData.<init>(CachedDatabaseMetaData.java:431)
           at org.apache.shardingsphere.mode.metadata.MetaDataContextsBuilder.createCachedDatabaseMetaData(MetaDataContextsBuilder.java:134)
           at org.apache.shardingsphere.mode.metadata.MetaDataContextsBuilder.buildResource(MetaDataContextsBuilder.java:113)
           at org.apache.shardingsphere.mode.metadata.MetaDataContextsBuilder.build(MetaDataContextsBuilder.java:98)
           at org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder.beforeBuildContextManager(ClusterContextManagerBuilder.java:106)
           at org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder.build(ClusterContextManagerBuilder.java:84)
           at org.apache.shardingsphere.proxy.initializer.BootstrapInitializer.initContext(BootstrapInitializer.java:77)
           at org.apache.shardingsphere.proxy.initializer.BootstrapInitializer.init(BootstrapInitializer.java:68)
           at org.apache.shardingsphere.proxy.Bootstrap.main(Bootstrap.java:47)
   [WARN ] 2021-11-15 20:52:30.863 [main] c.zaxxer.hikari.pool.ProxyConnection - HikariPool-1 - Connection org.postgresql.jdbc.PgConnection@162b3d47 marked as broken because of SQLSTATE(0A000), ErrorCode(0)
   java.sql.SQLFeatureNotSupportedException: 这个 org.postgresql.jdbc.PgDatabaseMetaData.getRowIdLifetime() 方法尚未被实作。
           at org.postgresql.Driver.notImplemented(Driver.java:688)
           at org.postgresql.jdbc.PgDatabaseMetaData.getRowIdLifetime(PgDatabaseMetaData.java:2562)
           at com.zaxxer.hikari.pool.HikariProxyDatabaseMetaData.getRowIdLifetime(HikariProxyDatabaseMetaData.java)
           at org.apache.shardingsphere.infra.metadata.resource.CachedDatabaseMetaData.getRowIdLifetimeFromOriginMetaData(CachedDatabaseMetaData.java:437)
           at org.apache.shardingsphere.infra.metadata.resource.CachedDatabaseMetaData.<init>(CachedDatabaseMetaData.java:431)
           at org.apache.shardingsphere.mode.metadata.MetaDataContextsBuilder.createCachedDatabaseMetaData(MetaDataContextsBuilder.java:134)
           at org.apache.shardingsphere.mode.metadata.MetaDataContextsBuilder.buildResource(MetaDataContextsBuilder.java:113)
           at org.apache.shardingsphere.mode.metadata.MetaDataContextsBuilder.build(MetaDataContextsBuilder.java:98)
           at org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder.beforeBuildContextManager(ClusterContextManagerBuilder.java:106)
           at org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder.build(ClusterContextManagerBuilder.java:84)
           at org.apache.shardingsphere.proxy.initializer.BootstrapInitializer.initContext(BootstrapInitializer.java:77)
           at org.apache.shardingsphere.proxy.initializer.BootstrapInitializer.init(BootstrapInitializer.java:68)
           at org.apache.shardingsphere.proxy.Bootstrap.main(Bootstrap.java:47)
   
   
   [INFO ] 2021-11-15 21:06:51.722 [main] o.a.s.p.i.BootstrapInitializer - Database name is `PostgreSQL`, version is `9.2.24`
   [INFO ] 2021-11-15 21:06:51.751 [epollEventLoopGroup-3-1] i.n.handler.logging.LoggingHandler - [id: 0x5ddcea1e] REGISTERED
   [INFO ] 2021-11-15 21:06:51.751 [epollEventLoopGroup-3-1] i.n.handler.logging.LoggingHandler - [id: 0x5ddcea1e] REGISTERED
   [INFO ] 2021-11-15 21:06:51.753 [epollEventLoopGroup-3-1] i.n.handler.logging.LoggingHandler - [id: 0x5ddcea1e] BIND: 0.0.0.0/0.0.0.0:3307
   [INFO ] 2021-11-15 21:06:51.753 [epollEventLoopGroup-3-1] i.n.handler.logging.LoggingHandler - [id: 0x5ddcea1e] BIND: 0.0.0.0/0.0.0.0:3307
   [INFO ] 2021-11-15 21:06:51.754 [epollEventLoopGroup-3-1] i.n.handler.logging.LoggingHandler - [id: 0x5ddcea1e, L:/0.0.0.0:3307] ACTIVE
   [INFO ] 2021-11-15 21:06:51.754 [epollEventLoopGroup-3-1] i.n.handler.logging.LoggingHandler - [id: 0x5ddcea1e, L:/0.0.0.0:3307] ACTIVE
   [INFO ] 2021-11-15 21:06:51.754 [main] o.a.s.p.frontend.ShardingSphereProxy - ShardingSphere-Proxy start success


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] penghuazhou commented on issue #13625: org.postgresql.jdbc.PgDatabaseMetaData.getRowIdLifetime() 方法尚未被实作

Posted by GitBox <gi...@apache.org>.
penghuazhou commented on issue #13625:
URL: https://github.com/apache/shardingsphere/issues/13625#issuecomment-969898499


   thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] sandynz commented on issue #13625: org.postgresql.jdbc.PgDatabaseMetaData.getRowIdLifetime() 方法尚未被实作

Posted by GitBox <gi...@apache.org>.
sandynz commented on issue #13625:
URL: https://github.com/apache/shardingsphere/issues/13625#issuecomment-969862616


   It doesn't matter. ShardingSphere will check underlying database supported features, this exception is thrown from PG JDBC driver and printed in HikariCP.
   
   org.apache.shardingsphere.infra.metadata.resource.CachedDatabaseMetaData
   ```
       private RowIdLifetime getRowIdLifetimeFromOriginMetaData(final DatabaseMetaData databaseMetaData) throws SQLException {
           try {
               return databaseMetaData.getRowIdLifetime();
           } catch (final SQLFeatureNotSupportedException ignore) {
               return RowIdLifetime.ROWID_UNSUPPORTED;
           }
       }
   ```
   
   org.postgresql.jdbc.PgDatabaseMetaData
   ```
     @Override
     public RowIdLifetime getRowIdLifetime() throws SQLException {
       throw org.postgresql.Driver.notImplemented(this.getClass(), "getRowIdLifetime()");
     }
   ```
   
   HikariProxyDatabaseMetaData
   ```
       public RowIdLifetime getRowIdLifetime() throws SQLException {
           try {
               return super.delegate.getRowIdLifetime();
           } catch (SQLException var2) {
               throw this.checkException(var2);
           }
       }
   ```
   
   com.zaxxer.hikari.pool.ProxyConnection
   ```
      final SQLException checkException(SQLException sqle)
      {
         SQLException nse = sqle;
         for (int depth = 0; delegate != ClosedConnection.CLOSED_CONNECTION && nse != null && depth < 10; depth++) {
            final String sqlState = nse.getSQLState();
            if (sqlState != null && sqlState.startsWith("08")
                || nse instanceof SQLTimeoutException
                || ERROR_STATES.contains(sqlState)
                || ERROR_CODES.contains(nse.getErrorCode())) {
   
               // broken connection
               LOGGER.warn("{} - Connection {} marked as broken because of SQLSTATE({}), ErrorCode({})",
                           poolEntry.getPoolName(), delegate, sqlState, nse.getErrorCode(), nse);
               leakTask.cancel();
               poolEntry.evict("(connection is broken)");
               delegate = ClosedConnection.CLOSED_CONNECTION;
            }
            else {
               nse = nse.getNextException();
            }
         }
   
         return sqle;
      }
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] penghuazhou closed issue #13625: org.postgresql.jdbc.PgDatabaseMetaData.getRowIdLifetime() 方法尚未被实作

Posted by GitBox <gi...@apache.org>.
penghuazhou closed issue #13625:
URL: https://github.com/apache/shardingsphere/issues/13625


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] sandynz edited a comment on issue #13625: org.postgresql.jdbc.PgDatabaseMetaData.getRowIdLifetime() 方法尚未被实作

Posted by GitBox <gi...@apache.org>.
sandynz edited a comment on issue #13625:
URL: https://github.com/apache/shardingsphere/issues/13625#issuecomment-969862616


   It doesn't matter. ShardingSphere will check underlying database supported features, this exception (SQLFeatureNotSupportedException) is thrown from PG JDBC driver and printed in HikariCP.
   
   org.apache.shardingsphere.infra.metadata.resource.CachedDatabaseMetaData
   ```
       private RowIdLifetime getRowIdLifetimeFromOriginMetaData(final DatabaseMetaData databaseMetaData) throws SQLException {
           try {
               return databaseMetaData.getRowIdLifetime();
           } catch (final SQLFeatureNotSupportedException ignore) {
               return RowIdLifetime.ROWID_UNSUPPORTED;
           }
       }
   ```
   
   org.postgresql.jdbc.PgDatabaseMetaData
   ```
     @Override
     public RowIdLifetime getRowIdLifetime() throws SQLException {
       throw org.postgresql.Driver.notImplemented(this.getClass(), "getRowIdLifetime()");
     }
   ```
   
   HikariProxyDatabaseMetaData
   ```
       public RowIdLifetime getRowIdLifetime() throws SQLException {
           try {
               return super.delegate.getRowIdLifetime();
           } catch (SQLException var2) {
               throw this.checkException(var2);
           }
       }
   ```
   
   com.zaxxer.hikari.pool.ProxyConnection
   ```
      final SQLException checkException(SQLException sqle)
      {
         SQLException nse = sqle;
         for (int depth = 0; delegate != ClosedConnection.CLOSED_CONNECTION && nse != null && depth < 10; depth++) {
            final String sqlState = nse.getSQLState();
            if (sqlState != null && sqlState.startsWith("08")
                || nse instanceof SQLTimeoutException
                || ERROR_STATES.contains(sqlState)
                || ERROR_CODES.contains(nse.getErrorCode())) {
   
               // broken connection
               LOGGER.warn("{} - Connection {} marked as broken because of SQLSTATE({}), ErrorCode({})",
                           poolEntry.getPoolName(), delegate, sqlState, nse.getErrorCode(), nse);
               leakTask.cancel();
               poolEntry.evict("(connection is broken)");
               delegate = ClosedConnection.CLOSED_CONNECTION;
            }
            else {
               nse = nse.getNextException();
            }
         }
   
         return sqle;
      }
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org