Skip to content

[Bug](MaterializedView) Fix bug of light schema change do not set right unique id cause MV coredump - #11396

Merged
BiteTheDDDDt merged 2 commits into
apache:masterfrom
HappenLee:bug
Aug 3, 2022
Merged

[Bug](MaterializedView) Fix bug of light schema change do not set right unique id cause MV coredump#11396
BiteTheDDDDt merged 2 commits into
apache:masterfrom
HappenLee:bug

Conversation

@HappenLee

Copy link
Copy Markdown
Contributor

Proposed changes

Issue Number: close#11334

Problem summary

Describe your changes.

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 (If Yes, please explain WHY)
    • No

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...

yiguolei
yiguolei previously approved these changes Aug 1, 2022

@yiguoleiyiguolei left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@github-actionsgithub-actionsBot added the area/planner Issues or PRs related to the query planner label Aug 1, 2022
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actionsgithub-actionsBot added the approved Indicates a PR has been approved by one committer. label Aug 1, 2022
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

Preconditions.checkNotNull(defineExpr != null);
Column result = new Column(name, type, isKey, aggregationType, ColumnDef.DefaultValue.ZERO, "");
result.setDefineExpr(defineExpr);
result.setUniqueId(olapTable.incAndGetMaxColUniqueId());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In the future, this change will cause problem when we want to support mv do light schema change and olapTable.incAndGetMaxColUniqueId() need to write editlog for duration.
the commit can justly use temporaryly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

could you try like this in MaterializedViewHandler.java checkAndPrepareMaterializedView()

 for (Column column : rollupSchema) {
column.setUniqueId(Column.COLUMN_UNIQUE_ID_INIT_VALUE);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

could you try like this in MaterializedViewHandler.java checkAndPrepareMaterializedView()

 for (Column column : rollupSchema) {
column.setUniqueId(Column.COLUMN_UNIQUE_ID_INIT_VALUE);
}

Hi, Do you can review #10792? I set uniqid also.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ the change will override yours

could you try like this in MaterializedViewHandler.java checkAndPrepareMaterializedView()

 for (Column column : rollupSchema) {
column.setUniqueId(Column.COLUMN_UNIQUE_ID_INIT_VALUE);
}

Hi, Do you can review #10792? I set uniqid also.

the change will override yours

@HappenLeeHappenLee changed the title [Bug] Fix bug of light schema change do not set right unique id cause MV coredump[Bug](MaterializedView) Fix bug of light schema change do not set right unique id cause MV coredumpAug 2, 2022
@github-actionsgithub-actionsBot removed the approved Indicates a PR has been approved by one committer. label Aug 2, 2022
swjtu-zhanglei
swjtu-zhanglei previously approved these changes Aug 2, 2022
defaultDb = "regression_test"

jdbcUrl = "jdbc:mysql://127.0.0.1:9030/?"
jdbcUrl = "jdbc:mysql://127.0.0.1:9031/?"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

need reset

@BiteTheDDDDt
BiteTheDDDDt merged commit 77d82bb into apache:masterAug 3, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/plannerIssues or PRs related to the query plannerkind/testreviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] core dump on compaction

4 participants

@HappenLee@BiteTheDDDDt@yiguolei@swjtu-zhanglei