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

[Improvement](light-schema-change) support tablet schema cache #11131

Merged
merged 1 commit into from
Aug 1, 2022

Conversation

Lchangliang
Copy link
Contributor

Proposed changes

Issue Number: close #xxx

Problem Summary:

The PR is for #10136. In that, every rowset will presist a tablet schema and use in memory by rowsetMetaPB. But When tablets and rowsets in tablet too more, memory will has a lot of pressure. So we need a way to avoid it.

In this pr, it will implement a global tablet schema cache. Every rowset will hold a tablet schema sptr from cache. That mean even we has tens of thousands of rowsets, if their schema is same, there will be one schema in memory.

Checklist(Required)

  1. Does it affect the original behavior: (Yes/No/I Don't know)
  2. Has unit tests been added: (Yes/No/No Need)
  3. Has document been added or modified: (Yes/No/No Need)
  4. Does it need to update dependencies: (Yes/No)
  5. Are there any changes that cannot be rolled back: (Yes/No)

Further comments

If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...

be/src/olap/tablet.cpp Outdated Show resolved Hide resolved
@Lchangliang Lchangliang changed the title [Improvement] support tablet schema cache [Improvement](light-schema-change) support tablet schema cache Aug 1, 2022
Copy link
Contributor

@yiguolei yiguolei left a comment

Choose a reason for hiding this comment

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

LGTM

@yiguolei yiguolei merged commit b35daf0 into apache:master Aug 1, 2022
yiguolei pushed a commit that referenced this pull request Aug 17, 2022
In engine_clone_task.cpp, it use tablet->tablet_schema() to create rowset, but in the method, it need a lock that already locked in engine_clone_task.cpp:514. It use cloned_tablet_meta->tablet_schema() originally, but modified in #11131. It need to revert to use cloned_tablet_meta->tablet_schema().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants