Skip to content

Conversation

@caiconghui
Copy link
Contributor

@caiconghui caiconghui commented Apr 9, 2021

Proposed changes

If none of new load jobs succeed on alter replica. the version can still be (0-1), and the replica's last failed version may be smaller than the specified version before which the history data has been transformed successfully. , because new load job may load data into alter replica with version smaller than the specified version.

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

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.

  • I have created an issue on (Fix [AlterTable] Failed to alter table #5612 ) and described the bug/feature there in detail
  • Compiling and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • If these changes need document changes, I have updated the document
  • Any dependent changes have been merged

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

@caiconghui caiconghui changed the title [Bug] [Bug] Fix bug that load data into table may write older version data to alter tablet when do alter table operation for schema change or add rollup [Bug] Fix bug that load data into table may write older version data to alter tablet when do alter table operation for schema change or add rollup Apr 9, 2021
@caiconghui caiconghui changed the title [Bug] Fix bug that load data into table may write older version data to alter tablet when do alter table operation for schema change or add rollup [Bug] Fix alter table failed when none of new load jobs succeed on alter replica Apr 13, 2021
partition.visualiseShadowIndex(rollupIndexId, false);
}
tbl.rebuildFullSchema();
tbl.setState(OlapTableState.NORMAL);
Copy link
Contributor

Choose a reason for hiding this comment

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

We can to batch rollup jobs, and I think the table's state should be set to NORMAL after all jobs are done,
which is in MaterializedViewHandler.onJobDone()

partition.deleteRollupIndex(rollupIndexId);
}
tbl.deleteIndexInfo(rollupIndexName);
tbl.setState(OlapTableState.NORMAL);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

@morningman morningman self-assigned this Apr 13, 2021
@morningman morningman added area/schema-change Issues or PRs related to schema change kind/fix Categorizes issue or PR as related to a bug. labels Apr 13, 2021
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

@morningman morningman added the approved Indicates a PR has been approved by one committer. label Apr 13, 2021
@caiconghui caiconghui merged commit b6c0767 into apache:master Apr 15, 2021
EmmyMiao87 pushed a commit to EmmyMiao87/incubator-doris that referenced this pull request May 14, 2021
…ter replica (apache#5617)

* [Bug] Fix alter table failed when none of new load jobs succeed on altering replica

Co-authored-by: caiconghui <caiconghui@xiaomi.com>
@caiconghui caiconghui deleted the Alter branch August 23, 2023 03:44
Hastyshell pushed a commit to Hastyshell/doris that referenced this pull request Nov 12, 2025
apache#57696 (apache#5617)

cherry-picks from apache#57696
Related to apache#5571

Co-authored-by: lw112 <131352377+felixwluo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. area/schema-change Issues or PRs related to schema change kind/fix Categorizes issue or PR as related to a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[AlterTable] Failed to alter table

2 participants