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

partial request cache still not working when deriving metrics from documents #4926

Closed
trinity-1686a opened this issue Apr 29, 2024 · 0 comments · Fixed by #4989
Closed

partial request cache still not working when deriving metrics from documents #4926

trinity-1686a opened this issue Apr 29, 2024 · 0 comments · Fixed by #4989
Assignees
Labels
enhancement New feature or request

Comments

@trinity-1686a
Copy link
Contributor

when using quickwit to derive metrics, you end up with queries looking like this (emitted by grafana datasource):

{
  "aggs": {
    "2": {
      "date_histogram": {
        "field": "timestamp",
        "fixed_interval": "1m",
        "min_doc_count": 0,
        "extended_bounds": {  // these dates prevent caching
          "min": 1672570377874,
          "max": 1672644841715
        }
      }
    }
  },
  "query": {
    "bool": {
      "filter": {
        "range": {
          "timestamp": { // these dates are correctly handled
            "gte": "2023-01-01T10:52:57.874Z",
            "lte": "2023-01-02T07:34:01.715Z"
          }
        }
      }
    }
  },
  "size": 0
}

sadly the extended_bounds changes at each query, which we don't handle, and causes the partial request cache to never hit on this kind of aggregation. An improvement could be to remove extended bounds in leaf_search_single_split so that the cache can hit, and verify we properly fill with zeroes when merging results from multiple leafs

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

Successfully merging a pull request may close this issue.

1 participant