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: administration functions #3236

Merged
merged 17 commits into from Feb 7, 2024

Conversation

killme2008
Copy link
Contributor

@killme2008 killme2008 commented Jan 25, 2024

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

Try to implement some administration functions:

  • database() to get the current database.
  • timezone() to get the current session timezone.
  • Added FunctionState for SQL functions to access table or meta service.
  • Preparation code for implementing some management functions such as procedure_state(pid) and migrate_region(region, from, to, timeout) etc. I'll implement them in the following PR.

Depends on GreptimeTeam/greptime-proto#137

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

Refer to a related PR or issue link (optional)

@github-actions github-actions bot added docs-not-required This change does not impact docs. Size: M labels Jan 25, 2024
@killme2008 killme2008 changed the title feat: administrator functions feat: administration functions Jan 25, 2024
@github-actions github-actions bot added Size: L and removed Size: M labels Jan 26, 2024
@killme2008 killme2008 marked this pull request as ready for review February 2, 2024 09:50
Copy link

codecov bot commented Feb 2, 2024

Codecov Report

Attention: 274 lines in your changes are missing coverage. Please review.

Comparison is base (0a9361a) 85.63% compared to head (dc46bab) 85.06%.
Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3236      +/-   ##
==========================================
- Coverage   85.63%   85.06%   -0.58%     
==========================================
  Files         859      871      +12     
  Lines      140515   141479     +964     
==========================================
+ Hits       120333   120344      +11     
- Misses      20182    21135     +953     

Copy link
Member

@WenyXu WenyXu left a comment

Choose a reason for hiding this comment

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

BTW, I'm not sure whether we should put truncate in the DDL procedure. Maybe we can refactor it in the future PRs. See also: #2968

src/common/function/src/state.rs Show resolved Hide resolved
src/common/function/src/table/migrate_region.rs Outdated Show resolved Hide resolved
src/meta-client/src/client/procedure.rs Outdated Show resolved Hide resolved
src/common/meta/src/error.rs Show resolved Hide resolved
src/common/query/src/error.rs Show resolved Hide resolved
src/meta-srv/src/metasrv.rs Outdated Show resolved Hide resolved
killme2008 and others added 2 commits February 6, 2024 09:30
Co-authored-by: Weny Xu <wenymedia@gmail.com>
Co-authored-by: Weny Xu <wenymedia@gmail.com>
killme2008 and others added 4 commits February 6, 2024 09:33
Co-authored-by: JeremyHi <jiachun_feng@proton.me>
Co-authored-by: fys <40801205+fengys1996@users.noreply.github.com>
@killme2008 killme2008 added this pull request to the merge queue Feb 7, 2024
Merged via the queue into GreptimeTeam:main with commit e5ec659 Feb 7, 2024
16 checks passed
@killme2008 killme2008 deleted the feature/admin-functions branch February 7, 2024 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants