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 schema change hang when data loading concurrent with schema change #23456

Merged
merged 1 commit into from
May 18, 2023

Conversation

luohaha
Copy link
Contributor

@luohaha luohaha commented May 16, 2023

What type of PR is this:

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

Which issues of this PR fixes:

Fixes #23452

Problem Summary(Required):

  1. Assume there is a partition, current visible version is 13378, and all loading task is finished.
  2. Trigger schema change, it will create new replica, and at the same time, one loading task is trigger and finished, and it's version is 13379.
  3. Before send alter replica request, FE check that all loading task is finished, but loading task on new create replica haven't finish yet and V=1, LFV=13379.
  4. Alter replica finish on BE, and BE send finish alter replica request back to FE. When call handleFinishAlterTask, checkState fail because LFV != -1.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr will affect users' behaviors
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto backported to target branch
    • 3.0
    • 2.5
    • 2.4
    • 2.3

sevev
sevev previously approved these changes May 16, 2023
@sonarcloud
Copy link

sonarcloud bot commented May 16, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@wanpengfei-git
Copy link
Collaborator

[FE PR Coverage Check]

😍 pass : 3 / 3 (100.00%)

file detail

path covered_line new_line coverage not_covered_line_detail
🔵 com/starrocks/task/AlterReplicaTask.java 3 3 100.00% []

@chaoyli chaoyli merged commit 084a19c into StarRocks:main May 18, 2023
@wanpengfei-git
Copy link
Collaborator

@Mergifyio backport branch-3.0

@github-actions github-actions bot removed the 3.0 label May 18, 2023
@wanpengfei-git
Copy link
Collaborator

@Mergifyio backport branch-2.5

@mergify
Copy link
Contributor

mergify bot commented May 18, 2023

backport branch-3.0

✅ Backports have been created

@github-actions github-actions bot removed the 2.5 label May 18, 2023
@wanpengfei-git
Copy link
Collaborator

@Mergifyio backport branch-2.4

@github-actions github-actions bot removed the 2.4 label May 18, 2023
@mergify
Copy link
Contributor

mergify bot commented May 18, 2023

backport branch-2.5

✅ Backports have been created

@wanpengfei-git
Copy link
Collaborator

@Mergifyio backport branch-2.3

@mergify
Copy link
Contributor

mergify bot commented May 18, 2023

backport branch-2.4

✅ Backports have been created

@github-actions github-actions bot removed the 2.3 label May 18, 2023
@mergify
Copy link
Contributor

mergify bot commented May 18, 2023

backport branch-2.3

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request May 18, 2023
…ema change (#23456)

Fixes #23452
1. Assume there is a partition, current visible version is 13378, and
all loading task is finished.
2. Trigger schema change, it will create new replica, and at the same
time, one loading task is trigger and finished, and it's version is
13379.
3. Before send alter replica request, FE check that all loading task is
finished, but loading task on new create replica haven't finish yet and
V=1, LFV=13379.
4. Alter replica finish on BE, and BE send finish alter replica request
back to FE. When call `handleFinishAlterTask`, `checkState` fail because
LFV != -1.

(cherry picked from commit 084a19c)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/task/AlterReplicaTask.java
mergify bot pushed a commit that referenced this pull request May 18, 2023
…ema change (#23456)

Fixes #23452
1. Assume there is a partition, current visible version is 13378, and
all loading task is finished.
2. Trigger schema change, it will create new replica, and at the same
time, one loading task is trigger and finished, and it's version is
13379.
3. Before send alter replica request, FE check that all loading task is
finished, but loading task on new create replica haven't finish yet and
V=1, LFV=13379.
4. Alter replica finish on BE, and BE send finish alter replica request
back to FE. When call `handleFinishAlterTask`, `checkState` fail because
LFV != -1.

(cherry picked from commit 084a19c)
mergify bot pushed a commit that referenced this pull request May 18, 2023
…ema change (#23456)

Fixes #23452
1. Assume there is a partition, current visible version is 13378, and
all loading task is finished.
2. Trigger schema change, it will create new replica, and at the same
time, one loading task is trigger and finished, and it's version is
13379.
3. Before send alter replica request, FE check that all loading task is
finished, but loading task on new create replica haven't finish yet and
V=1, LFV=13379.
4. Alter replica finish on BE, and BE send finish alter replica request
back to FE. When call `handleFinishAlterTask`, `checkState` fail because
LFV != -1.

(cherry picked from commit 084a19c)
mergify bot pushed a commit that referenced this pull request May 18, 2023
…ema change (#23456)

Fixes #23452
1. Assume there is a partition, current visible version is 13378, and
all loading task is finished.
2. Trigger schema change, it will create new replica, and at the same
time, one loading task is trigger and finished, and it's version is
13379.
3. Before send alter replica request, FE check that all loading task is
finished, but loading task on new create replica haven't finish yet and
V=1, LFV=13379.
4. Alter replica finish on BE, and BE send finish alter replica request
back to FE. When call `handleFinishAlterTask`, `checkState` fail because
LFV != -1.

(cherry picked from commit 084a19c)

# Conflicts:
#	fe/fe-core/src/main/java/com/starrocks/task/AlterReplicaTask.java
wanpengfei-git pushed a commit that referenced this pull request May 22, 2023
…ema change (#23456)

Fixes #23452
1. Assume there is a partition, current visible version is 13378, and
all loading task is finished.
2. Trigger schema change, it will create new replica, and at the same
time, one loading task is trigger and finished, and it's version is
13379.
3. Before send alter replica request, FE check that all loading task is
finished, but loading task on new create replica haven't finish yet and
V=1, LFV=13379.
4. Alter replica finish on BE, and BE send finish alter replica request
back to FE. When call `handleFinishAlterTask`, `checkState` fail because
LFV != -1.

(cherry picked from commit 084a19c)
wanpengfei-git pushed a commit that referenced this pull request May 22, 2023
…ema change (#23456)

Fixes #23452
1. Assume there is a partition, current visible version is 13378, and
all loading task is finished.
2. Trigger schema change, it will create new replica, and at the same
time, one loading task is trigger and finished, and it's version is
13379.
3. Before send alter replica request, FE check that all loading task is
finished, but loading task on new create replica haven't finish yet and
V=1, LFV=13379.
4. Alter replica finish on BE, and BE send finish alter replica request
back to FE. When call `handleFinishAlterTask`, `checkState` fail because
LFV != -1.

(cherry picked from commit 084a19c)
Moonm3n pushed a commit to Moonm3n/starrocks that referenced this pull request May 23, 2023
…ema change (StarRocks#23456)

Fixes StarRocks#23452
1. Assume there is a partition, current visible version is 13378, and
all loading task is finished.
2. Trigger schema change, it will create new replica, and at the same
time, one loading task is trigger and finished, and it's version is
13379.
3. Before send alter replica request, FE check that all loading task is
finished, but loading task on new create replica haven't finish yet and
V=1, LFV=13379.
4. Alter replica finish on BE, and BE send finish alter replica request
back to FE. When call `handleFinishAlterTask`, `checkState` fail because
LFV != -1.

Signed-off-by: Moonm3n <[email protected]>
wxl24life pushed a commit to wxl24life/starrocks that referenced this pull request May 25, 2023
…ema change (StarRocks#23456)

Fixes StarRocks#23452
1. Assume there is a partition, current visible version is 13378, and
all loading task is finished.
2. Trigger schema change, it will create new replica, and at the same
time, one loading task is trigger and finished, and it's version is
13379.
3. Before send alter replica request, FE check that all loading task is
finished, but loading task on new create replica haven't finish yet and
V=1, LFV=13379.
4. Alter replica finish on BE, and BE send finish alter replica request
back to FE. When call `handleFinishAlterTask`, `checkState` fail because
LFV != -1.
abc982627271 pushed a commit to abc982627271/starrocks that referenced this pull request Jun 5, 2023
…ema change (StarRocks#23456)

Fixes StarRocks#23452
1. Assume there is a partition, current visible version is 13378, and
all loading task is finished.
2. Trigger schema change, it will create new replica, and at the same
time, one loading task is trigger and finished, and it's version is
13379.
3. Before send alter replica request, FE check that all loading task is
finished, but loading task on new create replica haven't finish yet and
V=1, LFV=13379.
4. Alter replica finish on BE, and BE send finish alter replica request
back to FE. When call `handleFinishAlterTask`, `checkState` fail because
LFV != -1.
luohaha added a commit to luohaha/starrocks that referenced this pull request Jun 9, 2023
…ema change (StarRocks#23456)

Fixes StarRocks#23452
1. Assume there is a partition, current visible version is 13378, and
all loading task is finished.
2. Trigger schema change, it will create new replica, and at the same
time, one loading task is trigger and finished, and it's version is
13379.
3. Before send alter replica request, FE check that all loading task is
finished, but loading task on new create replica haven't finish yet and
V=1, LFV=13379.
4. Alter replica finish on BE, and BE send finish alter replica request
back to FE. When call `handleFinishAlterTask`, `checkState` fail because
LFV != -1.
luohaha added a commit to luohaha/starrocks that referenced this pull request Jun 9, 2023
…ema change (StarRocks#23456)

Fixes StarRocks#23452
1. Assume there is a partition, current visible version is 13378, and
all loading task is finished.
2. Trigger schema change, it will create new replica, and at the same
time, one loading task is trigger and finished, and it's version is
13379.
3. Before send alter replica request, FE check that all loading task is
finished, but loading task on new create replica haven't finish yet and
V=1, LFV=13379.
4. Alter replica finish on BE, and BE send finish alter replica request
back to FE. When call `handleFinishAlterTask`, `checkState` fail because
LFV != -1.
wanpengfei-git pushed a commit that referenced this pull request Jun 19, 2023
…ema change (#23456)

Fixes #23452
1. Assume there is a partition, current visible version is 13378, and
all loading task is finished.
2. Trigger schema change, it will create new replica, and at the same
time, one loading task is trigger and finished, and it's version is
13379.
3. Before send alter replica request, FE check that all loading task is
finished, but loading task on new create replica haven't finish yet and
V=1, LFV=13379.
4. Alter replica finish on BE, and BE send finish alter replica request
back to FE. When call `handleFinishAlterTask`, `checkState` fail because
LFV != -1.
wanpengfei-git pushed a commit that referenced this pull request Jun 19, 2023
…ema change (#23456)

Fixes #23452
1. Assume there is a partition, current visible version is 13378, and
all loading task is finished.
2. Trigger schema change, it will create new replica, and at the same
time, one loading task is trigger and finished, and it's version is
13379.
3. Before send alter replica request, FE check that all loading task is
finished, but loading task on new create replica haven't finish yet and
V=1, LFV=13379.
4. Alter replica finish on BE, and BE send finish alter replica request
back to FE. When call `handleFinishAlterTask`, `checkState` fail because
LFV != -1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] schema change hang when data loading concurrent with schema change
5 participants