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: consolidate Insert request related partitioning and distributed processing operations into Inserter #2346

Conversation

zhongzc
Copy link
Contributor

@zhongzc zhongzc commented Sep 8, 2023

I hereby agree to the terms of the GreptimeDB CLA

same for Delete requests

What's changed and what's your intention?

  • Remove frontend::instance::distributed::{inserter|deleter}
  • Add Partitioner for all {Insert|Delete} request converters to partition requests into region requests
  • Add handle_table_insert and handle_statement_insert to frontend::insert::Inserter
  • Add handle_table_insert to frontend::delete::Deleter
  • Remove handle in RegionServerHandler
  • frontend::insert::Inserter and frontend::delete::Deleter internally send distributed requests

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)

@codecov
Copy link

codecov bot commented Sep 8, 2023

Codecov Report

❗ No coverage uploaded for pull request base (migrate-region-server@1dd10f7). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head afa0b15 differs from pull request most recent head bc5f6a3. Consider uploading reports for the commit bc5f6a3 to get more accurate results

Additional details and impacted files
@@                   Coverage Diff                    @@
##             migrate-region-server    #2346   +/-   ##
========================================================
  Coverage                         ?   77.54%           
========================================================
  Files                            ?      714           
  Lines                            ?   113737           
  Branches                         ?        0           
========================================================
  Hits                             ?    88192           
  Misses                           ?    25545           
  Partials                         ?        0           

@zhongzc zhongzc marked this pull request as draft September 8, 2023 08:18
@zhongzc zhongzc changed the title refactor: RegionRequest as param of RegionRequestHandler.handle feat: partition insert & delete reqs for both standalone and distributed modes Sep 8, 2023
@zhongzc zhongzc marked this pull request as ready for review September 8, 2023 10:20
@zhongzc zhongzc changed the title feat: partition insert & delete reqs for both standalone and distributed modes feat: consolidate Insert request related partitioning and distributed processing operations into Inserter Sep 11, 2023
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

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.

Great job!

src/frontend/src/delete.rs Outdated Show resolved Hide resolved
src/frontend/src/insert.rs Outdated Show resolved Hide resolved
src/frontend/src/insert.rs Show resolved Hide resolved
src/frontend/src/req_convert/delete/column_to_row.rs Outdated Show resolved Hide resolved
src/frontend/src/req_convert/insert/column_to_row.rs Outdated Show resolved Hide resolved
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.

LGTM

@killme2008 killme2008 added this pull request to the merge queue Sep 12, 2023
Merged via the queue into GreptimeTeam:migrate-region-server with commit 6957fd1 Sep 12, 2023
10 checks passed
@zhongzc zhongzc deleted the zhongzc/refactor-region-handler branch September 12, 2023 04:02
waynexia pushed a commit that referenced this pull request Sep 12, 2023
… processing operations into Inserter (#2346)

* refactor: RegionRequest as param of RegionRequestHandler.handle

Signed-off-by: Zhenchi <[email protected]>

* feat: partition insert & delete reqs for both standalone and distributed mode

Signed-off-by: Zhenchi <[email protected]>

* chore: nit change

Signed-off-by: Zhenchi <[email protected]>

* fix: wrong function nameg

Signed-off-by: Zhenchi <[email protected]>

* feat: do request in inserter & deleter

Signed-off-by: Zhenchi <[email protected]>

* feat: remove RegionRequestHandler.handle

Signed-off-by: Zhenchi <[email protected]>

* refactor: rename table_creator

Signed-off-by: Zhenchi <[email protected]>

* chore: nit change

Signed-off-by: Zhenchi <[email protected]>

* refactor: address comments

Signed-off-by: Zhenchi <[email protected]>

* chore: nit change

Signed-off-by: Zhenchi <[email protected]>

---------

Signed-off-by: Zhenchi <[email protected]>
waynexia pushed a commit that referenced this pull request Sep 12, 2023
… processing operations into Inserter (#2346)

* refactor: RegionRequest as param of RegionRequestHandler.handle

Signed-off-by: Zhenchi <[email protected]>

* feat: partition insert & delete reqs for both standalone and distributed mode

Signed-off-by: Zhenchi <[email protected]>

* chore: nit change

Signed-off-by: Zhenchi <[email protected]>

* fix: wrong function nameg

Signed-off-by: Zhenchi <[email protected]>

* feat: do request in inserter & deleter

Signed-off-by: Zhenchi <[email protected]>

* feat: remove RegionRequestHandler.handle

Signed-off-by: Zhenchi <[email protected]>

* refactor: rename table_creator

Signed-off-by: Zhenchi <[email protected]>

* chore: nit change

Signed-off-by: Zhenchi <[email protected]>

* refactor: address comments

Signed-off-by: Zhenchi <[email protected]>

* chore: nit change

Signed-off-by: Zhenchi <[email protected]>

---------

Signed-off-by: Zhenchi <[email protected]>
waynexia pushed a commit that referenced this pull request Sep 12, 2023
… processing operations into Inserter (#2346)

* refactor: RegionRequest as param of RegionRequestHandler.handle

Signed-off-by: Zhenchi <[email protected]>

* feat: partition insert & delete reqs for both standalone and distributed mode

Signed-off-by: Zhenchi <[email protected]>

* chore: nit change

Signed-off-by: Zhenchi <[email protected]>

* fix: wrong function nameg

Signed-off-by: Zhenchi <[email protected]>

* feat: do request in inserter & deleter

Signed-off-by: Zhenchi <[email protected]>

* feat: remove RegionRequestHandler.handle

Signed-off-by: Zhenchi <[email protected]>

* refactor: rename table_creator

Signed-off-by: Zhenchi <[email protected]>

* chore: nit change

Signed-off-by: Zhenchi <[email protected]>

* refactor: address comments

Signed-off-by: Zhenchi <[email protected]>

* chore: nit change

Signed-off-by: Zhenchi <[email protected]>

---------

Signed-off-by: Zhenchi <[email protected]>
WenyXu pushed a commit to WenyXu/greptimedb that referenced this pull request Sep 13, 2023
… processing operations into Inserter (GreptimeTeam#2346)

* refactor: RegionRequest as param of RegionRequestHandler.handle

Signed-off-by: Zhenchi <[email protected]>

* feat: partition insert & delete reqs for both standalone and distributed mode

Signed-off-by: Zhenchi <[email protected]>

* chore: nit change

Signed-off-by: Zhenchi <[email protected]>

* fix: wrong function nameg

Signed-off-by: Zhenchi <[email protected]>

* feat: do request in inserter & deleter

Signed-off-by: Zhenchi <[email protected]>

* feat: remove RegionRequestHandler.handle

Signed-off-by: Zhenchi <[email protected]>

* refactor: rename table_creator

Signed-off-by: Zhenchi <[email protected]>

* chore: nit change

Signed-off-by: Zhenchi <[email protected]>

* refactor: address comments

Signed-off-by: Zhenchi <[email protected]>

* chore: nit change

Signed-off-by: Zhenchi <[email protected]>

---------

Signed-off-by: Zhenchi <[email protected]>
@zhongzc zhongzc restored the zhongzc/refactor-region-handler branch September 21, 2023 09:38
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
… processing operations into Inserter (GreptimeTeam#2346)

* refactor: RegionRequest as param of RegionRequestHandler.handle

Signed-off-by: Zhenchi <[email protected]>

* feat: partition insert & delete reqs for both standalone and distributed mode

Signed-off-by: Zhenchi <[email protected]>

* chore: nit change

Signed-off-by: Zhenchi <[email protected]>

* fix: wrong function nameg

Signed-off-by: Zhenchi <[email protected]>

* feat: do request in inserter & deleter

Signed-off-by: Zhenchi <[email protected]>

* feat: remove RegionRequestHandler.handle

Signed-off-by: Zhenchi <[email protected]>

* refactor: rename table_creator

Signed-off-by: Zhenchi <[email protected]>

* chore: nit change

Signed-off-by: Zhenchi <[email protected]>

* refactor: address comments

Signed-off-by: Zhenchi <[email protected]>

* chore: nit change

Signed-off-by: Zhenchi <[email protected]>

---------

Signed-off-by: Zhenchi <[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.

3 participants