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(mito): preparation to implementing write #2085

Merged
merged 20 commits into from
Aug 4, 2023

Conversation

evenyag
Copy link
Contributor

@evenyag evenyag commented Aug 2, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

This PR adds utilities for implementing write for mito2, which mainly contains conversion between protobuf types and some validations.

  • Imports an experimental greptime-proto that supports row insert requests
  • Adds proto_util mod to help convert types between db and proto
  • Validates and collects write requests in handle_write_requests. It use RegionWriteCtx to batch requests and maintains sequences
  • Implements some validation for WriteRequest.
  • Implements methods to fill columns by default value for WriteRequest

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)

@evenyag evenyag changed the title feat(mito): preparation to implement write feat(mito): preparation to implementing write Aug 3, 2023
@evenyag evenyag force-pushed the feat/mito2-write-request branch from c3883d2 to 4413b4a Compare August 3, 2023 06:48
@evenyag evenyag self-assigned this Aug 3, 2023
@evenyag evenyag mentioned this pull request Aug 3, 2023
2 tasks
@evenyag evenyag marked this pull request as ready for review August 3, 2023 07:05
@evenyag evenyag marked this pull request as draft August 3, 2023 07:07
@evenyag evenyag marked this pull request as ready for review August 3, 2023 07:20
@codecov
Copy link

codecov bot commented Aug 3, 2023

Codecov Report

Merging #2085 (b47da8a) into develop (dda9225) will decrease coverage by 0.61%.
Report is 6 commits behind head on develop.
The diff coverage is 3.58%.

@@             Coverage Diff             @@
##           develop    #2085      +/-   ##
===========================================
- Coverage    85.23%   84.63%   -0.61%     
===========================================
  Files          683      686       +3     
  Lines       106960   107455     +495     
===========================================
- Hits         91171    90948     -223     
- Misses       15789    16507     +718     

@evenyag evenyag requested a review from waynexia August 3, 2023 07:39
Copy link
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.

No test so I can only choose to believe the great coder

src/mito2/src/proto_util.rs Outdated Show resolved Hide resolved
src/mito2/src/request.rs Outdated Show resolved Hide resolved
Co-authored-by: dennis zhuang <[email protected]>
@evenyag evenyag added this pull request to the merge queue Aug 4, 2023
Merged via the queue into GreptimeTeam:develop with commit e5663a0 Aug 4, 2023
@evenyag evenyag deleted the feat/mito2-write-request branch August 4, 2023 03:03
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
* refactor: move request mod

* feat: add mutation

* feat: add handle_write mod

* feat: one mutation at a time

* feat: handle write requests

* feat: validate schema

* refactor: move schema check to write request

* feat: add convert value

* feat: fill default values

* chore: remove comments

* feat: remove code

* feat: remove code

* feat: buf requests

* style: fix clippy

* refactor: rename check functions

* chore: fix compile error

* chore: Revert "feat: remove code"

This reverts commit 6516597.

* chore: Revert "feat: remove code"

This reverts commit 5f2b790.

* chore: upgrade greptime-proto

* chore: Update comment

Co-authored-by: dennis zhuang <[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
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants