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: return request outdated error on handling alter #3239

Merged
merged 9 commits into from Jan 26, 2024

Conversation

waynexia
Copy link
Member

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

Mito engine returns ok on outdated requests. It confuses the caller to know if the request is actually performed. This PR changes the behavior on outdated alter request. It will now return a new status code RequestOutdated instead of an incorrect success.

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
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
src/common/meta/src/ddl/alter_table.rs Outdated Show resolved Hide resolved
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Copy link

codecov bot commented Jan 25, 2024

Codecov Report

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

Comparison is base (1bc4f25) 85.82% compared to head (79b455a) 85.17%.
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3239      +/-   ##
==========================================
- Coverage   85.82%   85.17%   -0.65%     
==========================================
  Files         845      856      +11     
  Lines      138876   140105    +1229     
==========================================
+ Hits       119184   119334     +150     
- Misses      19692    20771    +1079     

src/mito2/src/engine/alter_test.rs Outdated Show resolved Hide resolved
src/mito2/src/worker/handle_alter.rs Show resolved Hide resolved
src/mito2/src/error.rs Outdated Show resolved Hide resolved
src/mito2/src/worker/handle_alter.rs Show resolved Hide resolved
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
waynexia and others added 2 commits January 26, 2024 11:13
Co-authored-by: Weny Xu <wenymedia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
@waynexia waynexia added this pull request to the merge queue Jan 26, 2024
Merged via the queue into GreptimeTeam:main with commit 5617b28 Jan 26, 2024
15 checks passed
@waynexia waynexia deleted the alter-return-error branch January 26, 2024 03:49
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

4 participants