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: implement truncate region for mito2 #2335

Merged
merged 20 commits into from
Sep 15, 2023

Conversation

DevilExileSu
Copy link
Contributor

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

Implement truncate region for mito2.

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)

@DevilExileSu DevilExileSu marked this pull request as ready for review September 5, 2023 15:48
@codecov
Copy link

codecov bot commented Sep 5, 2023

Codecov Report

Merging #2335 (98c25f7) into develop (26992d5) will increase coverage by 0.03%.
Report is 12 commits behind head on develop.
The diff coverage is 97.38%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2335      +/-   ##
===========================================
+ Coverage    77.53%   77.56%   +0.03%     
===========================================
  Files          717      718       +1     
  Lines       113962   113553     -409     
===========================================
- Hits         88356    88076     -280     
+ Misses       25606    25477     -129     

src/mito2/src/region/version.rs Outdated Show resolved Hide resolved
src/mito2/src/flush.rs Outdated Show resolved Hide resolved
src/mito2/src/engine/truncate_test.rs Outdated Show resolved Hide resolved
src/mito2/src/engine/truncate_test.rs Outdated Show resolved Hide resolved
src/mito2/src/worker/handle_truncate.rs Outdated Show resolved Hide resolved
src/mito2/src/worker/handle_truncate.rs Outdated Show resolved Hide resolved
src/mito2/src/engine/tests.rs Outdated Show resolved Hide resolved
src/mito2/src/worker/handle_truncate.rs Show resolved Hide resolved
@DevilExileSu DevilExileSu marked this pull request as draft September 6, 2023 13:35
@DevilExileSu DevilExileSu force-pushed the mito2/turncate_region branch 4 times, most recently from 7144883 to b5113ef Compare September 12, 2023 03:01
@DevilExileSu DevilExileSu marked this pull request as ready for review September 12, 2023 08:23
@DevilExileSu DevilExileSu marked this pull request as draft September 12, 2023 10:08
@waynexia waynexia force-pushed the migrate-region-server branch from 50cea29 to f1f7824 Compare September 12, 2023 12:23
src/mito2/src/engine/truncate_test.rs Outdated Show resolved Hide resolved
src/mito2/src/test_util.rs Outdated Show resolved Hide resolved
src/mito2/src/compaction/twcs.rs Outdated Show resolved Hide resolved
src/mito2/src/manifest/action.rs Outdated Show resolved Hide resolved
src/mito2/src/manifest/action.rs Outdated Show resolved Hide resolved
src/mito2/src/region/version.rs Outdated Show resolved Hide resolved
src/mito2/src/worker/handle_truncate.rs Show resolved Hide resolved
src/mito2/src/engine/truncate_test.rs Outdated Show resolved Hide resolved
src/mito2/src/engine/truncate_test.rs Outdated Show resolved Hide resolved
src/mito2/src/engine/truncate_test.rs Outdated Show resolved Hide resolved
@DevilExileSu DevilExileSu changed the base branch from migrate-region-server to develop September 12, 2023 14:18
@DevilExileSu DevilExileSu marked this pull request as ready for review September 13, 2023 16:27
src/mito2/src/worker/handle_truncate.rs Outdated Show resolved Hide resolved
src/mito2/src/worker/handle_flush.rs Outdated Show resolved Hide resolved
src/mito2/src/engine/truncate_test.rs Outdated Show resolved Hide resolved
src/mito2/src/engine/truncate_test.rs Outdated Show resolved Hide resolved
@DevilExileSu DevilExileSu marked this pull request as draft September 14, 2023 07:08
@DevilExileSu DevilExileSu marked this pull request as ready for review September 14, 2023 13:16
Copy link
Contributor

@killme2008 killme2008 left a comment

Choose a reason for hiding this comment

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

Good job! A few suggestions about docs.

src/mito2/src/engine/listener.rs Show resolved Hide resolved
src/mito2/src/engine/listener.rs Show resolved Hide resolved
src/mito2/src/flush.rs Show resolved Hide resolved
src/mito2/src/manifest/action.rs Show resolved Hide resolved
src/mito2/src/region/version.rs Outdated Show resolved Hide resolved
src/mito2/src/worker/handle_flush.rs Outdated Show resolved Hide resolved
src/mito2/src/worker/handle_truncate.rs Outdated Show resolved Hide resolved
@killme2008 killme2008 added this pull request to the merge queue Sep 15, 2023
Merged via the queue into GreptimeTeam:develop with commit 0bd6b9b Sep 15, 2023
11 checks passed
@DevilExileSu DevilExileSu deleted the mito2/turncate_region branch September 15, 2023 14:55
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
* feat: implement truncate region for mito2.

* chore: add license header and fix typos

* Update src/mito2/src/worker/handle_truncate.rs

Co-authored-by: Yingwen <[email protected]>

* cr

* chore: consider the flush task being executed before truncating the region.

* test

* feat: check flush and compaction tasks

* chore: remove useless changes

* Update src/mito2/src/manifest/action.rs

Co-authored-by: Yingwen <[email protected]>

* Update src/mito2/src/worker/handle_flush.rs

Co-authored-by: Yingwen <[email protected]>

* chore: CR, consider sequence number

* test: use EventListener to test the flush task during truncate

* fix: fix listener error

* Update src/mito2/src/engine/truncate_test.rs

Co-authored-by: Yingwen <[email protected]>

* chore: cr

* fix: remove set None

* Update src/mito2/src/region/version.rs

Co-authored-by: dennis zhuang <[email protected]>

* Update src/mito2/src/worker/handle_flush.rs

Co-authored-by: dennis zhuang <[email protected]>

* Update src/mito2/src/worker/handle_truncate.rs

Co-authored-by: dennis zhuang <[email protected]>

* doc: add some doc for FlushTruncateListener and RegionTruncate

---------

Co-authored-by: Yingwen <[email protected]>
Co-authored-by: dennis zhuang <[email protected]>
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.

4 participants