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

[BugFix] Fix replace temp partition bug for multi column partition table #49764

Merged

Conversation

gengjun-git
Copy link
Contributor

@gengjun-git gengjun-git commented Aug 13, 2024

Why I'm doing:

There will be a shadow partition for auto-create partition table, but for multi column partition table, it should be put into idToMultiValues.

What I'm doing:

Create the shadow partition according to isMultiColumnPartition();

Fixes

 com.starrocks.journal.JournalInconsistentException: failed to load journal type 210
        at com.starrocks.persist.EditLog.loadJournal(EditLog.java:1195)
        at com.starrocks.server.GlobalStateMgr.replayJournalInner(GlobalStateMgr.java:1879)
        at com.starrocks.server.GlobalStateMgr.replayJournal(GlobalStateMgr.java:1828)
        at com.starrocks.server.GlobalStateMgr.transferToLeader(GlobalStateMgr.java:1190)
        at com.starrocks.server.GlobalStateMgr$1.transferToLeader(GlobalStateMgr.java:732)
        at com.starrocks.ha.StateChangeExecutor.runOneCycle(StateChangeExecutor.java:103)
        at com.starrocks.common.util.Daemon.run(Daemon.java:107)
Caused by: java.lang.NullPointerException
        at com.starrocks.catalog.CatalogUtils.checkTempPartitionConflict(CatalogUtils.java:217)
        at com.starrocks.catalog.OlapTable.replaceTempPartitions(OlapTable.java:2644)
        at com.starrocks.server.LocalMetastore.replayReplaceTempPartition(LocalMetastore.java:4724)
        at com.starrocks.persist.EditLog.loadJournal(EditLog.java:834)

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.3
    • 3.2
    • 3.1
    • 3.0
    • 2.5

Documentation PRs only:

If you are submitting a PR that adds or changes English documentation and have not
included Chinese documentation, then you can check the box to request GPT to translate the
English doc to Chinese. Please ensure to uncheck the Do not translate box if translation is needed.
The workflow will generate a new PR with the Chinese translation after this PR is merged.

  • Yes, translate English markdown files with GPT
  • Do not translate

nshangyiming
nshangyiming previously approved these changes Aug 13, 2024
itemList.forEach(item -> {
cur.add(item.getRealObjectValue());
});
itemList.forEach(item -> cur.add(item.getRealObjectValue()));
Copy link
Contributor

Choose a reason for hiding this comment

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

can you just use the stream.map ? this is weird

@gengjun-git
Copy link
Contributor Author

@Mergifyio rebase

Signed-off-by: gengjun-git <[email protected]>
Signed-off-by: gengjun-git <[email protected]>
Signed-off-by: gengjun-git <[email protected]>
Copy link
Contributor

mergify bot commented Aug 15, 2024

rebase

✅ Branch has been successfully rebased

@gengjun-git gengjun-git force-pushed the fix_multi_column_partition_replace_bug branch from d9b2e96 to 2c39dd8 Compare August 15, 2024 11:20
@gengjun-git gengjun-git enabled auto-merge (squash) August 15, 2024 13:16
murphyatwork
murphyatwork previously approved these changes Aug 16, 2024
Signed-off-by: gengjun-git <[email protected]>
Copy link

sonarcloud bot commented Aug 16, 2024

Copy link

[Java-Extensions Incremental Coverage Report]

pass : 0 / 0 (0%)

Copy link

[FE Incremental Coverage Report]

pass : 19 / 20 (95.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/catalog/ListPartitionInfo.java 6 7 85.71% [615]
🔵 com/starrocks/catalog/CatalogUtils.java 13 13 100.00% []

Copy link

[BE Incremental Coverage Report]

pass : 0 / 0 (0%)

@gengjun-git gengjun-git merged commit 4c585a7 into StarRocks:main Aug 16, 2024
49 checks passed
Copy link

@Mergifyio backport branch-3.3

@github-actions github-actions bot removed the 3.3 label Aug 16, 2024
Copy link

@Mergifyio backport branch-3.2

@github-actions github-actions bot removed the 3.2 label Aug 16, 2024
Copy link

@Mergifyio backport branch-3.1

@github-actions github-actions bot removed the 3.1 label Aug 16, 2024
Copy link

@Mergifyio backport branch-3.0

@github-actions github-actions bot removed the 3.0 label Aug 16, 2024
Copy link
Contributor

mergify bot commented Aug 16, 2024

backport branch-3.3

✅ Backports have been created

Copy link
Contributor

mergify bot commented Aug 16, 2024

backport branch-3.2

✅ Backports have been created

Copy link
Contributor

mergify bot commented Aug 16, 2024

backport branch-3.1

✅ Backports have been created

Copy link
Contributor

mergify bot commented Aug 16, 2024

backport branch-3.0

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Aug 16, 2024
…ble (#49764)

## Why I'm doing:
There will be a shadow partition for auto-create partition table, but for multi column partition table, it should be put into idToMultiValues.

## What I'm doing:
Create the shadow partition according to isMultiColumnPartition();

Fixes
```
 com.starrocks.journal.JournalInconsistentException: failed to load journal type 210
        at com.starrocks.persist.EditLog.loadJournal(EditLog.java:1195)
        at com.starrocks.server.GlobalStateMgr.replayJournalInner(GlobalStateMgr.java:1879)
        at com.starrocks.server.GlobalStateMgr.replayJournal(GlobalStateMgr.java:1828)
        at com.starrocks.server.GlobalStateMgr.transferToLeader(GlobalStateMgr.java:1190)
        at com.starrocks.server.GlobalStateMgr$1.transferToLeader(GlobalStateMgr.java:732)
        at com.starrocks.ha.StateChangeExecutor.runOneCycle(StateChangeExecutor.java:103)
        at com.starrocks.common.util.Daemon.run(Daemon.java:107)
Caused by: java.lang.NullPointerException
        at com.starrocks.catalog.CatalogUtils.checkTempPartitionConflict(CatalogUtils.java:217)
        at com.starrocks.catalog.OlapTable.replaceTempPartitions(OlapTable.java:2644)
        at com.starrocks.server.LocalMetastore.replayReplaceTempPartition(LocalMetastore.java:4724)
        at com.starrocks.persist.EditLog.loadJournal(EditLog.java:834)
```

Signed-off-by: gengjun-git <[email protected]>
(cherry picked from commit 4c585a7)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/catalog/ListPartitionInfo.java
mergify bot pushed a commit that referenced this pull request Aug 16, 2024
…ble (#49764)

## Why I'm doing:
There will be a shadow partition for auto-create partition table, but for multi column partition table, it should be put into idToMultiValues.

## What I'm doing:
Create the shadow partition according to isMultiColumnPartition();

Fixes
```
 com.starrocks.journal.JournalInconsistentException: failed to load journal type 210
        at com.starrocks.persist.EditLog.loadJournal(EditLog.java:1195)
        at com.starrocks.server.GlobalStateMgr.replayJournalInner(GlobalStateMgr.java:1879)
        at com.starrocks.server.GlobalStateMgr.replayJournal(GlobalStateMgr.java:1828)
        at com.starrocks.server.GlobalStateMgr.transferToLeader(GlobalStateMgr.java:1190)
        at com.starrocks.server.GlobalStateMgr$1.transferToLeader(GlobalStateMgr.java:732)
        at com.starrocks.ha.StateChangeExecutor.runOneCycle(StateChangeExecutor.java:103)
        at com.starrocks.common.util.Daemon.run(Daemon.java:107)
Caused by: java.lang.NullPointerException
        at com.starrocks.catalog.CatalogUtils.checkTempPartitionConflict(CatalogUtils.java:217)
        at com.starrocks.catalog.OlapTable.replaceTempPartitions(OlapTable.java:2644)
        at com.starrocks.server.LocalMetastore.replayReplaceTempPartition(LocalMetastore.java:4724)
        at com.starrocks.persist.EditLog.loadJournal(EditLog.java:834)
```

Signed-off-by: gengjun-git <[email protected]>
(cherry picked from commit 4c585a7)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/catalog/ListPartitionInfo.java
mergify bot pushed a commit that referenced this pull request Aug 16, 2024
…ble (#49764)

## Why I'm doing:
There will be a shadow partition for auto-create partition table, but for multi column partition table, it should be put into idToMultiValues.

## What I'm doing:
Create the shadow partition according to isMultiColumnPartition();

Fixes
```
 com.starrocks.journal.JournalInconsistentException: failed to load journal type 210
        at com.starrocks.persist.EditLog.loadJournal(EditLog.java:1195)
        at com.starrocks.server.GlobalStateMgr.replayJournalInner(GlobalStateMgr.java:1879)
        at com.starrocks.server.GlobalStateMgr.replayJournal(GlobalStateMgr.java:1828)
        at com.starrocks.server.GlobalStateMgr.transferToLeader(GlobalStateMgr.java:1190)
        at com.starrocks.server.GlobalStateMgr$1.transferToLeader(GlobalStateMgr.java:732)
        at com.starrocks.ha.StateChangeExecutor.runOneCycle(StateChangeExecutor.java:103)
        at com.starrocks.common.util.Daemon.run(Daemon.java:107)
Caused by: java.lang.NullPointerException
        at com.starrocks.catalog.CatalogUtils.checkTempPartitionConflict(CatalogUtils.java:217)
        at com.starrocks.catalog.OlapTable.replaceTempPartitions(OlapTable.java:2644)
        at com.starrocks.server.LocalMetastore.replayReplaceTempPartition(LocalMetastore.java:4724)
        at com.starrocks.persist.EditLog.loadJournal(EditLog.java:834)
```

Signed-off-by: gengjun-git <[email protected]>
(cherry picked from commit 4c585a7)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/catalog/ListPartitionInfo.java
mergify bot pushed a commit that referenced this pull request Aug 16, 2024
…ble (#49764)

## Why I'm doing:
There will be a shadow partition for auto-create partition table, but for multi column partition table, it should be put into idToMultiValues.

## What I'm doing:
Create the shadow partition according to isMultiColumnPartition();

Fixes
```
 com.starrocks.journal.JournalInconsistentException: failed to load journal type 210
        at com.starrocks.persist.EditLog.loadJournal(EditLog.java:1195)
        at com.starrocks.server.GlobalStateMgr.replayJournalInner(GlobalStateMgr.java:1879)
        at com.starrocks.server.GlobalStateMgr.replayJournal(GlobalStateMgr.java:1828)
        at com.starrocks.server.GlobalStateMgr.transferToLeader(GlobalStateMgr.java:1190)
        at com.starrocks.server.GlobalStateMgr$1.transferToLeader(GlobalStateMgr.java:732)
        at com.starrocks.ha.StateChangeExecutor.runOneCycle(StateChangeExecutor.java:103)
        at com.starrocks.common.util.Daemon.run(Daemon.java:107)
Caused by: java.lang.NullPointerException
        at com.starrocks.catalog.CatalogUtils.checkTempPartitionConflict(CatalogUtils.java:217)
        at com.starrocks.catalog.OlapTable.replaceTempPartitions(OlapTable.java:2644)
        at com.starrocks.server.LocalMetastore.replayReplaceTempPartition(LocalMetastore.java:4724)
        at com.starrocks.persist.EditLog.loadJournal(EditLog.java:834)
```

Signed-off-by: gengjun-git <[email protected]>
(cherry picked from commit 4c585a7)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/catalog/ListPartitionInfo.java
wanpengfei-git pushed a commit that referenced this pull request Aug 19, 2024
…ble (backport #49764) (#49898)

Signed-off-by: gengjun-git <[email protected]>
Co-authored-by: gengjun-git <[email protected]>
wanpengfei-git pushed a commit that referenced this pull request Aug 22, 2024
…ble (backport #49764) (#49896)

Signed-off-by: gengjun-git <[email protected]>
Co-authored-by: gengjun-git <[email protected]>
wanpengfei-git pushed a commit that referenced this pull request Aug 23, 2024
…ble (backport #49764) (#49897)

Signed-off-by: gengjun-git <[email protected]>
Co-authored-by: gengjun-git <[email protected]>
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.

5 participants