Skip to content

refactor: separate compaction stuff from task scheduler#1021

Merged
waynexia merged 12 commits intoGreptimeTeam:developfrom
v0y4g3r:refactor/task-scheduler
Feb 16, 2023
Merged

refactor: separate compaction stuff from task scheduler#1021
waynexia merged 12 commits intoGreptimeTeam:developfrom
v0y4g3r:refactor/task-scheduler

Conversation

@v0y4g3r
Copy link
Copy Markdown
Contributor

@v0y4g3r v0y4g3r commented Feb 16, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

This PR move the compaction logic out of CompactionScheduler so that the scheduler can be used by file purger and flush.

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)

@v0y4g3r v0y4g3r requested review from evenyag, killme2008 and waynexia and removed request for killme2008 February 16, 2023 08:13
@v0y4g3r v0y4g3r marked this pull request as ready for review February 16, 2023 08:13
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 16, 2023

Codecov Report

Merging #1021 (24049c1) into develop (04afee2) will decrease coverage by 0.21%.
The diff coverage is 77.59%.

@@             Coverage Diff             @@
##           develop    #1021      +/-   ##
===========================================
- Coverage    86.09%   85.88%   -0.21%     
===========================================
  Files          436      437       +1     
  Lines        63288    63432     +144     
===========================================
- Hits         54486    54479       -7     
- Misses        8802     8953     +151     
Flag Coverage Δ
rust 85.88% <77.59%> (-0.21%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/datanode/src/datanode.rs 67.53% <ø> (ø)
src/storage/src/compaction/noop.rs 16.66% <0.00%> (-2.57%) ⬇️
src/storage/src/compaction/picker.rs 23.07% <ø> (-19.24%) ⬇️
src/storage/src/compaction/task.rs 0.00% <ø> (-11.01%) ⬇️
src/storage/src/lib.rs 100.00% <ø> (ø)
src/storage/src/scheduler/dedup_deque.rs 71.42% <0.00%> (ø)
src/storage/src/compaction/scheduler.rs 82.80% <74.19%> (-6.20%) ⬇️
src/storage/src/scheduler.rs 85.98% <85.98%> (ø)
src/datanode/src/instance.rs 43.77% <100.00%> (-14.19%) ⬇️
src/storage/src/scheduler/rate_limit.rs 100.00% <100.00%> (ø)
... and 41 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Copy Markdown
Contributor

@evenyag evenyag left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@waynexia waynexia left a comment

Choose a reason for hiding this comment

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

LGTM

@waynexia waynexia merged commit 16f86a9 into GreptimeTeam:develop Feb 16, 2023
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
…#1021)

* refactor: make schedule request return value generic

* feat: add handler trait

* wip

* feat: use task handler

* fix: unit test

* refactor: separate scheduler mod

* chore: rename

* chore: Request use associate type

* refactor: use associate type

* refactor: use associate type to reduce generic parameters

* chore: further remove generic types

* chore: further remove a generic parameter
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