-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
feature: add prefix counter for NamedThreadFactory #1710
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #1710 +/- ##
=============================================
- Coverage 50.73% 50.71% -0.02%
- Complexity 2162 2163 +1
=============================================
Files 414 414
Lines 14153 14156 +3
Branches 1700 1700
=============================================
- Hits 7180 7179 -1
- Misses 6284 6287 +3
- Partials 689 690 +1
Continue to review full report at Codecov.
|
common/src/main/java/io/seata/common/thread/NamedThreadFactoryEx.java
Outdated
Show resolved
Hide resolved
a49c5e7
to
330af41
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* 'develop' of https://github.com/seata/seata: feature:support gRpc (apache#1492) bugfix:fix auto proxy for multiple-datasource does not work (apache#1793) optimize: increase rm code coverage by db mock (apache#1674) bugfix: mysql can not get primary key value (apache#1788) bugfix: jdk 11 remoteAddress is null (apache#1764) test: verify that the analysis of the cause of issue 1702 is correct (apache#1710) optimize: seata server register eureka instance id (apache#1790) optimize: put message to logQueue (apache#1760) optimize:optimize rpc remoting log(apache#1787) optimize: simplify code (apache#1786) version: change version to 1.0.0-SNAPSHOT (apache#1785) bugfix: clean up resources in time to avoid mutual influence between unit tests (apache#1778) optimize:remove unused method (apache#1766) bugfix: DeleteExecutor. buildBeforeImageSQL keyword checker by db type (apache#1777) optimize: string splice and release lock (apache#1770) release 0.9.0 (apache#1771) bugfix: oracle rollback failed when the table has null Blob Clob value (apache#1761) bugfix: service method not support interface type parameter (apache#1759) optimize: abstract table meta cache (apache#1750) optimize: improve the efficiency of the batch log (apache#1743)
Ⅰ. Describe what this PR did
Though PR #1576 is one reason of #1702, but it's obviously incomplete. I suspect that there are multiple
AsyncCommitting
threads executing at the same time causing this test failure.The reason is that maven-surefire-plugin was used, but parameters
reuseForks
andforkCount
were left to be their default values. According to maven-surefire-plugin doc, only one VM was forked and then reused to execute all tests.The log below could prove this, notice the UUID used in two test cases:
Because several test case in seata didn't release resources in time, for example, in test case
DefaultCoordinatorMetricsTest
,DefaultCoordinator#init
was called, but never destroyed, that whenDefaultCoreForEventBusTest
started, there may be more than one asyncCommitting threads running.It's not so easy to reproduce this test failure, so this PR is opened to verify this suspicion, just waiting for the next failure. I'm not sure whether this suspicion is correct, if it proves right, all test cases should be checked and try to release resources created correctly.
This suspicion proves correct, if we can get log looks like below, please notice the thread name:
Update(2019/10/17):
As the issue #1702 has been solved, change to a feature PR, it's helpful to investigate threads related issues.
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews