Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YCQL] Using DataGrip to get schema info results in - Object Not Found SELECT * FROM system.peers_v2 #3862

Closed
z0mb1ek opened this issue Mar 6, 2020 · 0 comments
Assignees
Labels
community/request Issues created by external users

Comments

@z0mb1ek
Copy link

z0mb1ek commented Mar 6, 2020

Hi. I like to use DataGrip and want to use it with YCQL. Now I get error:

E0306 15:46:13.724454 99 process_context.cc:180] SQL Error: Object Not Found
SELECT * FROM system.peers_v2

@z0mb1ek z0mb1ek changed the title Add jdbc-driver to use in DataGrip Add jdbc-driver to use in DataGrip for YCQL Mar 6, 2020
@yugabyte-ci yugabyte-ci added the community/request Issues created by external users label Mar 6, 2020
@kmuthukk kmuthukk changed the title Add jdbc-driver to use in DataGrip for YCQL [YCQL] Using DataGrip to get schema info results in - Object Not Found SELECT * FROM system.peers_v2 Mar 6, 2020
@ndeodhar ndeodhar assigned psudheer21 and unassigned OlegLoginov Mar 6, 2020
psudheer21 pushed a commit that referenced this issue Mar 25, 2020
Summary:
Currently we send empty rows if we encounter system tables that are not
present. However, the newer vanilla cassandra drivers {4.x} expect a particular error in
case of system.peers_v2 in order to fallback to querying the system.peers table which
Yugabyte YCQL actually implements.

This change makes sure that we send this required error back to the
client, so that Yugabyte YCQL works well these newer drivers.

Test Plan:
Tested using the cqlsh tool to make sure that the proper error is returned.

Created a sample java  app that queries the database using the 4.5.1 cassandra driver.
With the  old code, running the sample app causes:

f4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" com.datastax.oss.driver.api.core.DriverExecutionException
	at com.datastax.oss.driver.internal.core.util.concurrent.CompletableFutures.getUninterruptibly(CompletableFutures.java:152)
	at com.datastax.oss.driver.api.core.session.SessionBuilder.build(SessionBuilder.java:612)
	at test1.CassTest1.main(CassTest1.java:27)
Caused by: com.datastax.oss.driver.internal.core.adminrequest.UnexpectedResponseException: query 'SELECT * FROM system.peers_v2' got unexpected response VOID
	at com.datastax.oss.driver.internal.core.adminrequest.AdminRequestHandler.onResponse(AdminRequestHandler.java:176)
	at com.datastax.oss.driver.internal.core.channel.InFlightHandler.channelRead(InFlightHandler.java:255)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
	at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
....

With the new code the query works propely.

Reviewers: mihnea

Reviewed By: mihnea

Subscribers: yql

Differential Revision: https://phabricator.dev.yugabyte.com/D8172
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community/request Issues created by external users
Projects
None yet
Development

No branches or pull requests

6 participants