Skip to content

[MemerySave] Change TabletSchema in tablet to reference to save mem#6814

Merged
morningman merged 1 commit intoapache:masterfrom
HappenLee:bug-fix
Oct 16, 2021
Merged

[MemerySave] Change TabletSchema in tablet to reference to save mem#6814
morningman merged 1 commit intoapache:masterfrom
HappenLee:bug-fix

Conversation

@HappenLee
Copy link
Contributor

Proposed changes

Change TabletSchema in tablet to reference to save mem

Types of changes

What types of changes does your code introduce to Doris?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)
  • Code refactor (Modify the code structure, format the code, etc...)
  • Optimization. Including functional usability improvements and performance improvements.
  • Dependency. Such as changes related to third-party components.
  • Other.

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

const std::unordered_map<uint32_t, uint32_t>& col_ordinal_to_unique_id,
TabletUid tablet_uid, TTabletType::type tabletType)
: _tablet_uid(0, 0), _preferred_rowset_type(ALPHA_ROWSET) {
: _tablet_uid(0, 0), _preferred_rowset_type(ALPHA_ROWSET), _schema(new TabletSchema) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
: _tablet_uid(0, 0), _preferred_rowset_type(ALPHA_ROWSET), _schema(new TabletSchema) {
: _tablet_uid(0, 0), _preferred_rowset_type(BETA_ROWSET), _schema(new TabletSchema) {

init_from_pb(tablet_meta_pb);
}

TabletMeta::TabletMeta(const TabletMeta& b)
Copy link
Contributor

Choose a reason for hiding this comment

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

This may be error prone?
If I add some other fields in tablet meta and forget to modify here?

Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Oct 15, 2021
@morningman morningman added area/memory-consumption and removed approved Indicates a PR has been approved by one committer. labels Oct 15, 2021
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@morningman morningman merged commit a0b3840 into apache:master Oct 16, 2021
morningman pushed a commit that referenced this pull request Oct 19, 2021
…6814)

Change TabletSchema in tablet to reference to save memory
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.

[Enhancement] Change TabletSchema Of Tablet Copy To Reference To Save Mem

2 participants