-
Notifications
You must be signed in to change notification settings - Fork 706
feat(streaming): add cache for materialize and handle pk conflict #6320
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #6320 +/- ##
==========================================
- Coverage 74.28% 74.10% -0.18%
==========================================
Files 960 966 +6
Lines 156525 157743 +1218
==========================================
+ Hits 116277 116899 +622
- Misses 40248 40844 +596
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
…into wcy/add_cache_for_materialize
st1page
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
) * temp commit * framework * temp_commit * temp_commit * temp commit * framework done * temp commit * bug need to fix * need to add ut * ensure correctness * refactor * todo: add more unit test * todo: add comments, clean up code * todo: clean up code * typo fix * typo fix * refactor code * ready for review * code refactor * add e2e and ut * ready for review * dashboard * change cache row to compacted_row and add get_compacted_row for state table * change cache row to compacted_row and add get_compacted_row for state table * materialize cache do not store vnode in key * clean up state table get_row * materialize source handle pk conflict * merge main * merge main * mv check concurrent read * improve panic msg * fix * refine the code * clippy * Delete package-lock.json * Delete package.json Co-authored-by: Yuhao Su <[email protected]> Co-authored-by: st1page <[email protected]> Co-authored-by: stonepage <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.
What's changed and what's your intention?
This PR add cache for materialize executor and is used to do pk conflict check. If some cases like double insert or delete wrong value occurs, materialize need to fix it instead of ignore. Some unit tests are to verify the implement,
Checklist
./risedev check(or alias,./risedev c)Documentation
Types of user-facing changes
Release note
This PR has implemented the pk constraint check for the materialized source and table. If the following changes conflict with the existing record in storage, we will let the change overwrite the data in the table and the MVs which depend on it. This behavior also can support the "Upsert" connector. When the connector can not give the whole old value of the delete/update operations, It can just give the pk.
Refer to a related PR or issue link (optional)
close #6239
part of #5949