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

fix dead lock in multi DB when using batchUpdate(#31038) #31118

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

H-Jason
Copy link
Contributor

@H-Jason H-Jason commented May 5, 2024

Fixes #31038.

Changes proposed in this pull request:

图片


Before committing this PR, I'm sure that I have checked the following options:

  • My code follows the code of conduct of this project.
  • I have self-reviewed the commit code.
  • I have (or in comment I request) added corresponding labels for the pull request.
  • I have passed maven check locally : ./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.
  • I have made corresponding changes to the documentation.
  • I have added corresponding unit tests for my changes.

Copy link
Member

@linghengqian linghengqian left a comment

Choose a reason for hiding this comment

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

@H-Jason
Copy link
Contributor Author

H-Jason commented Jun 5, 2024

@H-Jason H-Jason closed this Jun 5, 2024
@H-Jason
Copy link
Contributor Author

H-Jason commented Jun 5, 2024

I have rebased the master branch

@linghengqian
Copy link
Member

I have rebased the master branch

  • But why do you need to turn off PR?

@H-Jason H-Jason reopened this Jun 5, 2024
@H-Jason
Copy link
Contributor Author

H-Jason commented Jun 5, 2024

I have rebased the master branch

* But why do you need to turn off PR?

I am sorry,just misoperation

Copy link
Member

@linghengqian linghengqian left a comment

Choose a reason for hiding this comment

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

  • The PR did not pass the code formatting validation. You can execute first ./mvnw spotless:apply -Pcheck -T1C. Then execute ./mvnw checkstyle:check -Pcheck -T1C to manually adjust to repair the CI.

@H-Jason
Copy link
Contributor Author

H-Jason commented Jun 5, 2024

  • The PR did not pass the code formatting validation. You can execute first ./mvnw spotless:apply -Pcheck -T1C. Then execute ./mvnw checkstyle:check -Pcheck -T1C to manually adjust to repair the CI.

done

Copy link
Member

@linghengqian linghengqian left a comment

Choose a reason for hiding this comment

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

Failures (1):
  JUnit Jupiter:ClickHouseTest:assertShardingInLocalTransactions()
    MethodSource [className = 'org.apache.shardingsphere.test.natived.jdbc.databases.ClickHouseTest', methodName = 'assertShardingInLocalTransactions', methodParameterTypes = '']
    => java.lang.AssertionError: 
Expected: <[1, 1, 1, 1, 1, 0, 0, 0, 0, 0]>
     but: was <[0, 0, 0, 0, 0, 1, 1, 1, 1, 1]>
       org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
       org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:8)
       org.apache.shardingsphere.test.natived.jdbc.commons.TestShardingService.processSuccessInClickHouse(TestShardingService.java:100)
       org.apache.shardingsphere.test.natived.jdbc.databases.ClickHouseTest.assertShardingInLocalTransactions(ClickHouseTest.java:47)
       [email protected]/java.lang.reflect.Method.invoke(Method.java:580)
       [email protected]/java.util.ArrayList.forEach(ArrayList.java:1596)
       [email protected]/java.util.ArrayList.forEach(ArrayList.java:1596)

@H-Jason
Copy link
Contributor Author

H-Jason commented Jun 5, 2024

Failures (1):
  JUnit Jupiter:ClickHouseTest:assertShardingInLocalTransactions()
    MethodSource [className = 'org.apache.shardingsphere.test.natived.jdbc.databases.ClickHouseTest', methodName = 'assertShardingInLocalTransactions', methodParameterTypes = '']
    => java.lang.AssertionError: 
Expected: <[1, 1, 1, 1, 1, 0, 0, 0, 0, 0]>
     but: was <[0, 0, 0, 0, 0, 1, 1, 1, 1, 1]>
       org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
       org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:8)
       org.apache.shardingsphere.test.natived.jdbc.commons.TestShardingService.processSuccessInClickHouse(TestShardingService.java:100)
       org.apache.shardingsphere.test.natived.jdbc.databases.ClickHouseTest.assertShardingInLocalTransactions(ClickHouseTest.java:47)
       [email protected]/java.lang.reflect.Method.invoke(Method.java:580)
       [email protected]/java.util.ArrayList.forEach(ArrayList.java:1596)
       [email protected]/java.util.ArrayList.forEach(ArrayList.java:1596)

done

@linghengqian linghengqian added this to the 5.5.1 milestone Jun 5, 2024
Copy link
Member

@linghengqian linghengqian left a comment

Choose a reason for hiding this comment

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

  • This PR indeed explains some phenomena that have existed before and does affect some integration tests. From my perspective, there doesn't seem to be any significant issue with the current PR at this point. I'll await the completion of the CI process.

@H-Jason
Copy link
Contributor Author

H-Jason commented Jun 5, 2024

  • This PR indeed explains some phenomena that have existed before and does affect some integration tests. From my perspective, there doesn't seem to be any significant issue with the current PR at this point. I'll await the completion of the CI process.

Thank you for your recognition.

@linghengqian linghengqian linked an issue Jun 5, 2024 that may be closed by this pull request
@linghengqian linghengqian merged commit a5f3363 into apache:master Jun 5, 2024
142 checks passed
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.

Deadlocks in multi DB when multi thread excute batchUpdate
2 participants