-
Notifications
You must be signed in to change notification settings - Fork 22
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
Ignore forwarding CQL requests for Insights Client #139
Conversation
proxy/pkg/zdmproxy/cqlparser.go
Outdated
@@ -213,13 +214,18 @@ func getRequestInfoFromQueryInfo( | |||
} | |||
} else if queryInfo.getStatementType() == statementTypeUse { | |||
sendAlsoToAsync = true | |||
} else if queryInfo.getStatementType() == statementTypeCall { | |||
// RPC client, typically used by "insights reporter" for DSE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it's safer to parse the actual function being called, I'm not sure if there are other RPCs being used with DSE, maybe stuff related to Spark and/or search
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Storing the first identifier would be enough I think? And then check if that identifier matches InsightsRpc
(case insensitive to be safe)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good idea. Updated code.
proxy/pkg/zdmproxy/cqlparser.go
Outdated
@@ -213,13 +218,20 @@ func getRequestInfoFromQueryInfo( | |||
} | |||
} else if queryInfo.getStatementType() == statementTypeUse { | |||
sendAlsoToAsync = true | |||
} else if queryInfo.getStatementType() == statementTypeCall { | |||
if queryInfo.getCallRpcName() == insightsRpcName { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be a case insensitive comparison? Idk if using CALL insightsrpc
work so better be safe than sorry?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Very nice stuff 👍 |
7822d7f
to
449aca8
Compare
No description provided.