Skip to content

[bug](cloud restore) forbid restoring table with property 'light_schema change' = 'false' in cloud mode - #62914

Merged
xy720 merged 2 commits into
apache:masterfrom
xy720:forbit-cloud-restore-non-lsc-table
May 7, 2026
Merged

[bug](cloud restore) forbid restoring table with property 'light_schema change' = 'false' in cloud mode#62914
xy720 merged 2 commits into
apache:masterfrom
xy720:forbit-cloud-restore-non-lsc-table

Conversation

@xy720

@xy720xy720 commented Apr 28, 2026

Copy link
Copy Markdown
Member

What problem does this PR solve?

Avoid restore non-light-schema-change table in cloud mode. Because non-light-schema-change table may have different schema with same schema version(which is always 0), which will cause very bad problem to metadata in cloud mode.

For example:

There is a partitioned table with 'light_schema change' = 'false', its tablet schema is

Tablet a1's schema in Partition A before schema change

schema version 0
col1 uid=0
col2 uid=1
col3 uid=2
col4 uid=3
__delete_sign_column__ uid=4

Now we add column to this table, then:

Tablet a1's schema in Partition A after schema change

schema version 0
col1 uid=0
col2 uid=1
col3 uid=2
col4 uid=3
__delete_sign_column__ uid=4
col5 uid=5

Now we add partition B to this table, then

Tablet b1's schema in Partition B is:

schema version 0
col1 uid=0
col2 uid=1
col3 uid=2
col4 uid=3
col5 uid=4
__delete_sign_column__ uid=5

Then we will have two different tablet schema (a1 and b1) with same index id and same schema version 0 in this table.

This should not happen in cloud mode.

if we backup and restore this table to cluster in cloud mode, the restored table will not be select correctly.

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@xy720

Copy link
Copy Markdown
MemberAuthor

run buildall

1 similar comment
@xy720

Copy link
Copy Markdown
MemberAuthor

run buildall

@lide-reed
lide-reed self-requested a review May 6, 2026 09:18

@lide-reedlide-reed 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

@xy720

xy720 commented May 7, 2026

Copy link
Copy Markdown
MemberAuthor

run buildall

@xy720
xy720 merged commit d34b16c into apache:masterMay 7, 2026
28 of 30 checks passed
zhaorongsheng pushed a commit to zhaorongsheng/doris that referenced this pull request Jun 4, 2026
…ma change' = 'false' in cloud mode (apache#62914)
Avoid restore non-light-schema-change table in cloud mode. Because
non-light-schema-change table may have different schema with same schema
version(which is always 0), which will cause very bad problem to
metadata in cloud mode.
For example:
There is a partitioned table with 'light_schema change' = 'false', its
tablet schema is
Tablet a1's schema in Partition A before schema change
```
schema version 0
col1 uid=0
col2 uid=1
col3 uid=2
col4 uid=3
__delete_sign_column__ uid=4
```
Now we add column to this table, then:
Tablet a1's schema in Partition A after schema change
```
schema version 0
col1 uid=0
col2 uid=1
col3 uid=2
col4 uid=3
__delete_sign_column__ uid=4
col5 uid=5
```
Now we add partition B to this table, then
Tablet b1's schema in Partition B is:
```
schema version 0
col1 uid=0
col2 uid=1
col3 uid=2
col4 uid=3
col5 uid=4
__delete_sign_column__ uid=5
```
Then we will have two different tablet schema (a1 and b1) with same
index id and same schema version 0 in this table.
This should not happen in cloud mode. if we backup and restore this table to cluster in cloud mode, the
restored table will not be select correctly.
Co-authored-by: lide <lide@apache.org>
github-actionsBot pushed a commit that referenced this pull request Jun 25, 2026
…ma change' = 'false' in cloud mode (#62914)
Avoid restore non-light-schema-change table in cloud mode. Because
non-light-schema-change table may have different schema with same schema
version(which is always 0), which will cause very bad problem to
metadata in cloud mode.
For example:
There is a partitioned table with 'light_schema change' = 'false', its
tablet schema is
Tablet a1's schema in Partition A before schema change
```
schema version 0
col1 uid=0
col2 uid=1
col3 uid=2
col4 uid=3
__delete_sign_column__ uid=4
```
Now we add column to this table, then:
Tablet a1's schema in Partition A after schema change
```
schema version 0
col1 uid=0
col2 uid=1
col3 uid=2
col4 uid=3
__delete_sign_column__ uid=4
col5 uid=5
```
Now we add partition B to this table, then
Tablet b1's schema in Partition B is:
```
schema version 0
col1 uid=0
col2 uid=1
col3 uid=2
col4 uid=3
col5 uid=4
__delete_sign_column__ uid=5
```
Then we will have two different tablet schema (a1 and b1) with same
index id and same schema version 0 in this table.
This should not happen in cloud mode. if we backup and restore this table to cluster in cloud mode, the
restored table will not be select correctly.
Co-authored-by: lide <lide@apache.org>
github-actionsBot pushed a commit that referenced this pull request Jun 25, 2026
…ma change' = 'false' in cloud mode (#62914)
Avoid restore non-light-schema-change table in cloud mode. Because
non-light-schema-change table may have different schema with same schema
version(which is always 0), which will cause very bad problem to
metadata in cloud mode.
For example:
There is a partitioned table with 'light_schema change' = 'false', its
tablet schema is
Tablet a1's schema in Partition A before schema change
```
schema version 0
col1 uid=0
col2 uid=1
col3 uid=2
col4 uid=3
__delete_sign_column__ uid=4
```
Now we add column to this table, then:
Tablet a1's schema in Partition A after schema change
```
schema version 0
col1 uid=0
col2 uid=1
col3 uid=2
col4 uid=3
__delete_sign_column__ uid=4
col5 uid=5
```
Now we add partition B to this table, then
Tablet b1's schema in Partition B is:
```
schema version 0
col1 uid=0
col2 uid=1
col3 uid=2
col4 uid=3
col5 uid=4
__delete_sign_column__ uid=5
```
Then we will have two different tablet schema (a1 and b1) with same
index id and same schema version 0 in this table.
This should not happen in cloud mode. if we backup and restore this table to cluster in cloud mode, the
restored table will not be select correctly.
Co-authored-by: lide <lide@apache.org>
yiguolei pushed a commit that referenced this pull request Jun 29, 2026
… 'light_schema change' = 'false' in cloud mode #62914 (#64835)
Cherry-picked from #62914
Co-authored-by: xy720 <22125576+xy720@users.noreply.github.com>
Co-authored-by: lide <lide@apache.org>
@yiguoleiyiguolei mentioned this pull request Jul 7, 2026
morrySnow pushed a commit that referenced this pull request Aug 31, 2026
…ma change' = 'false' in cloud mode (#62914)
Avoid restore non-light-schema-change table in cloud mode. Because
non-light-schema-change table may have different schema with same schema
version(which is always 0), which will cause very bad problem to
metadata in cloud mode.
For example:
There is a partitioned table with 'light_schema change' = 'false', its
tablet schema is
Tablet a1's schema in Partition A before schema change
```
schema version 0
col1 uid=0
col2 uid=1
col3 uid=2
col4 uid=3
__delete_sign_column__ uid=4
```
Now we add column to this table, then:
Tablet a1's schema in Partition A after schema change
```
schema version 0
col1 uid=0
col2 uid=1
col3 uid=2
col4 uid=3
__delete_sign_column__ uid=4
col5 uid=5
```
Now we add partition B to this table, then
Tablet b1's schema in Partition B is:
```
schema version 0
col1 uid=0
col2 uid=1
col3 uid=2
col4 uid=3
col5 uid=4
__delete_sign_column__ uid=5
```
Then we will have two different tablet schema (a1 and b1) with same
index id and same schema version 0 in this table.
This should not happen in cloud mode. if we backup and restore this table to cluster in cloud mode, the
restored table will not be select correctly.
Co-authored-by: lide <lide@apache.org>
Sign up for freeto 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

@xy720@lide-reed@yiguolei