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(mito): Allow to retry create request and alter request #2447

Merged
merged 7 commits into from
Sep 20, 2023

Conversation

evenyag
Copy link
Contributor

@evenyag evenyag commented Sep 19, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

This PR allows the same RegioniCreateRequest/RegionAlterRequest to execute multiple times so creating/altering a region is idempotent.

Now the mito engine

  • opens the region before creating a new region
  • adds a new column if it does not exist
  • drops a column if it exists

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)

@evenyag evenyag marked this pull request as ready for review September 20, 2023 02:39
@codecov
Copy link

codecov bot commented Sep 20, 2023

Codecov Report

Merging #2447 (a56050c) into develop (0f79cca) will decrease coverage by 0.07%.
Report is 1 commits behind head on develop.
The diff coverage is 92.58%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2447      +/-   ##
===========================================
- Coverage    77.59%   77.53%   -0.07%     
===========================================
  Files          717      717              
  Lines       112419   112740     +321     
===========================================
+ Hits         87234    87414     +180     
- Misses       25185    25326     +141     

Copy link
Collaborator

@fengjiachun fengjiachun left a comment

Choose a reason for hiding this comment

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

LGTM

@evenyag evenyag added this pull request to the merge queue Sep 20, 2023
Merged via the queue into GreptimeTeam:develop with commit 17e560c Sep 20, 2023
19 checks passed
@evenyag evenyag deleted the feat/mito2-create-alter-retry branch September 20, 2023 06:47
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
…Team#2447)

* feat: RegionMetadataBuilder allow adding/dropping columns multiple times

* test: test add if not exists/drop if exists

* feat: change validator and add need_alter

* test: fix tests and test need_alter

* test: test alter retry

* feat: open before create

* style: fix clippy
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