Skip to content

feat: consolidate Insert request related partitioning and distributed processing operations into Inserter#2346

Merged
killme2008 merged 10 commits intoGreptimeTeam:migrate-region-serverfrom
zhongzc:zhongzc/refactor-region-handler
Sep 12, 2023
Merged

feat: consolidate Insert request related partitioning and distributed processing operations into Inserter#2346
killme2008 merged 10 commits intoGreptimeTeam:migrate-region-serverfrom
zhongzc:zhongzc/refactor-region-handler

Conversation

@zhongzc
Copy link
Copy Markdown
Collaborator

@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)

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
@codecov
Copy link
Copy Markdown

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
…ted mode

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
@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
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
@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
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
Copy link
Copy Markdown
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
Copy Markdown
Member

@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!

Comment thread src/frontend/src/delete.rs Outdated
Comment thread src/frontend/src/insert.rs Outdated
Comment thread src/frontend/src/insert.rs
Comment thread src/frontend/src/req_convert/delete/column_to_row.rs Outdated
Comment thread src/frontend/src/req_convert/insert/column_to_row.rs Outdated
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
Copy link
Copy Markdown
Member

@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
@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 <zhongzc_arch@outlook.com>

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

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* chore: nit change

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* fix: wrong function nameg

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* feat: do request in inserter & deleter

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* feat: remove RegionRequestHandler.handle

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* refactor: rename table_creator

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* chore: nit change

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* refactor: address comments

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* chore: nit change

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

---------

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
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 <zhongzc_arch@outlook.com>

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

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* chore: nit change

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* fix: wrong function nameg

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* feat: do request in inserter & deleter

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* feat: remove RegionRequestHandler.handle

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* refactor: rename table_creator

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* chore: nit change

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* refactor: address comments

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* chore: nit change

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

---------

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
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 <zhongzc_arch@outlook.com>

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

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* chore: nit change

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* fix: wrong function nameg

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* feat: do request in inserter & deleter

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* feat: remove RegionRequestHandler.handle

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* refactor: rename table_creator

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* chore: nit change

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* refactor: address comments

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* chore: nit change

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

---------

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
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 <zhongzc_arch@outlook.com>

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

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* chore: nit change

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* fix: wrong function nameg

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* feat: do request in inserter & deleter

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* feat: remove RegionRequestHandler.handle

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* refactor: rename table_creator

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* chore: nit change

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* refactor: address comments

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* chore: nit change

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

---------

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
@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 <zhongzc_arch@outlook.com>

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

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* chore: nit change

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* fix: wrong function nameg

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* feat: do request in inserter & deleter

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* feat: remove RegionRequestHandler.handle

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* refactor: rename table_creator

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* chore: nit change

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* refactor: address comments

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

* chore: nit change

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>

---------

Signed-off-by: Zhenchi <zhongzc_arch@outlook.com>
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