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 2022/04/09 04:41:41 UTC

[GitHub] [shardingsphere] sandynz opened a new issue, #16691: Define which default frontend database protocol type to be used in proxy by user

sandynz opened a new issue, #16691:
URL: https://github.com/apache/shardingsphere/issues/16691

   ## Feature Request
   
   ### Is your feature request related to a problem?
   Yes.
   
   My testing scenario: test scaling job on MogDB, without `config-sharding.yaml`, totally use DistSQL.
   
   When I configure a totally new namespace in Cluster type ZooKeeper repository, and then start proxy. Proxy will use MySQL protocol, since there's no existing metadata for the decision, it use default protocol MySQL (via `FrontDatabaseProtocolTypeFactory.getDatabaseType()`). When I use other database clients to connect proxy, it can't login and there's exception in proxy log:
   ```
   [ERROR] 2022-04-09 11:54:06.690 [nioEventLoopGroup-3-1] o.a.s.p.f.n.FrontendChannelInboundHandler - Exception occur: 
   java.lang.IndexOutOfBoundsException: readerIndex(1) + length(4) exceeds writerIndex(1): PooledSlicedByteBuf(ridx: 1, widx: 1, cap: 1/1, unwrapped: PooledUnsafeDirectByteBuf(ridx: 4, widx: 8, cap: 2048))
   	at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1442)
   	at io.netty.buffer.AbstractByteBuf.readIntLE(AbstractByteBuf.java:817)
   	at org.apache.shardingsphere.db.protocol.mysql.payload.MySQLPacketPayload.readInt4(MySQLPacketPayload.java:115)
   	at org.apache.shardingsphere.db.protocol.mysql.packet.handshake.MySQLHandshakeResponse41Packet.<init>(MySQLHandshakeResponse41Packet.java:56)
   	at org.apache.shardingsphere.proxy.frontend.mysql.authentication.MySQLAuthenticationEngine.authPhaseFastPath(MySQLAuthenticationEngine.java:88)
   	at org.apache.shardingsphere.proxy.frontend.mysql.authentication.MySQLAuthenticationEngine.authenticate(MySQLAuthenticationEngine.java:75)
   	at org.apache.shardingsphere.proxy.frontend.netty.FrontendChannelInboundHandler.authenticate(FrontendChannelInboundHandler.java:83)
   	at org.apache.shardingsphere.proxy.frontend.netty.FrontendChannelInboundHandler.channelRead(FrontendChannelInboundHandler.java:75)
   ```
   
   ### Describe the feature you would like.
   Possible solution:
   Could we add a new parameter for proxy to define which protocol should proxy use? Just like define a new port.
   


-- 
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.apache.org

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


[GitHub] [shardingsphere] sandynz closed issue #16691: Define which default frontend database protocol type to be used in proxy by user

Posted by GitBox <gi...@apache.org>.
sandynz closed issue #16691: Define which default frontend database protocol type to be used in proxy by user
URL: https://github.com/apache/shardingsphere/issues/16691


-- 
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 #16691: Define which default frontend database protocol type to be used in proxy by user

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

   Thanks. I didn't notice `ConfigurationPropertyKey.PROXY_FRONTEND_DATABASE_PROTOCOL_TYPE` before.
   I tested `proxy-frontend-database-protocol-type: openGauss` property, it works.


-- 
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] TeslaCN commented on issue #16691: Define which default frontend database protocol type to be used in proxy by user

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

   The config has already existed since #8580, but it is not present in documents.


-- 
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