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

logging statement for large cardinality queries #1145

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

kvpetrov
Copy link
Contributor

Pull Request checklist

  • The commit(s) message(s) follows the contribution guidelines ?
  • Tests for the changes have been added (for bug fixes / features) ?
  • Docs have been added / updated (for bug fixes / features) ?

Current behavior : (link exiting issues here : https://help.github.com/articles/basic-writing-and-formatting-syntax/#referencing-issues-and-pull-requests)

New behavior :

BREAKING CHANGES

If this PR contains a breaking change, please describe the impact and migration
path for existing applications.
If not please remove this section.

Breaking changes may include:

  • Any schema changes to any Cassandra tables
  • The serialized format for Dataset and Column (see .toString methods)
  • Over the wire formats for Akka messages / case classes
  • Changes to the HTTP public API
  • Changes to query parsing / PromQL parsing

Other information:

if (recs.size > 100000) {
// if we have a 3 bit spread and one shard has more than 100K tss, it means
// that the cardinality of the query is ~800K close to a million, hence we want to log such queries
logger.warn(s"Number of tss: ${recs.size} for query ${querySession.qContext.origQueryParams}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kvpetrov is it also possible to add a toString override here https://github.com/filodb/FiloDB/blob/develop/core/src/main/scala/filodb.core/query/QueryContext.scala#L17 and convert it to a key=value pairs for better readability in logs for querySession.qContext.origQueryParams?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants