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

feat: impl instant query interface #1410

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

waynexia
Copy link
Member

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

Implement the query API of Prometheus server. It's used to perform instant query

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
@waynexia waynexia requested a review from yuanbohan April 18, 2023 07:21
@codecov
Copy link

codecov bot commented Apr 18, 2023

Codecov Report

Merging #1410 (d4d9b83) into develop (408de51) will decrease coverage by 0.57%.
The diff coverage is 83.09%.

@@             Coverage Diff             @@
##           develop    #1410      +/-   ##
===========================================
- Coverage    86.00%   85.44%   -0.57%     
===========================================
  Files          533      534       +1     
  Lines        79474    79602     +128     
===========================================
- Hits         68350    68012     -338     
- Misses       11124    11590     +466     

@yuanbohan
Copy link
Contributor

what's the behavior if the table is not exist? Prometheus prefers empty result instead of TableNotExistError, and it does make sense in Prometheus compatible services, like AlertManager, Grafana, etc,.

@waynexia
Copy link
Member Author

what's the behavior if the table is not exist? Prometheus prefers empty result instead of TableNotExistError, and it does make sense in Prometheus compatible services, like AlertManager, Grafana, etc,.

Makes sense to return an empty result in this API. I'll add a hook after query execution to convert this kind of error

@waynexia
Copy link
Member Author

Just found it's already done when I implemented query_range lol. PTAL again @yuanbohan

@waynexia waynexia requested a review from sunng87 April 18, 2023 14:14
@sunng87 sunng87 merged commit e8bb00f into GreptimeTeam:develop Apr 18, 2023
@waynexia waynexia deleted the non-range-query branch April 19, 2023 02:41
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
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.

3 participants