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: use system time and current folder to jstack #3931

Merged
merged 5 commits into from
Aug 9, 2021

Conversation

leizhiyuan
Copy link
Contributor

Ⅰ. Describe what this PR did

use System.currentTimeMillis() as id, and jstack dump to current folder.

Ⅱ. Does this pull request fix one issue?

fixes #3922

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2021

Codecov Report

Merging #3931 (6cf58e7) into develop (21ab990) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3931      +/-   ##
=============================================
- Coverage      40.76%   40.74%   -0.02%     
+ Complexity      3067     3066       -1     
=============================================
  Files            682      682              
  Lines          22948    22950       +2     
  Branches        2856     2856              
=============================================
- Hits            9355     9352       -3     
- Misses         12722    12726       +4     
- Partials         871      872       +1     
Impacted Files Coverage Δ
...io/seata/core/rpc/netty/AbstractNettyRemoting.java 14.56% <0.00%> (-0.20%) ⬇️
...n/src/main/java/io/seata/common/util/IdWorker.java 77.08% <0.00%> (-6.25%) ⬇️

@leizhiyuan
Copy link
Contributor Author

try {
Runtime.getRuntime().exec("jstack " + pid + " >d:/" + idx + ".log");
Runtime.getRuntime().exec("jstack " + pid + " > " + idx + ".log");
Copy link
Member

Choose a reason for hiding this comment

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

may be no permission, use current execute user home dir?

Copy link
Member

Choose a reason for hiding this comment

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

and log.info the command?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

may be no permission, use current execute user home dir?

I think this operation will dump the file to the folder of the running path?

Copy link
Member

Choose a reason for hiding this comment

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

recommended to add logging record commands. view the stack information path from the log information.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@jsbxyyx
Copy link
Member

jsbxyyx commented Aug 6, 2021

rename pr title

@leizhiyuan leizhiyuan changed the title fix:fix issue 3918, use system time to jstack bugfix: use system time and current folder to jstack Aug 6, 2021
Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

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

@leizhiyuan a small problem about code style, please fix it.

image

Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

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

LGTM

@slievrly slievrly merged commit b3620e6 into apache:develop Aug 9, 2021
@slievrly slievrly added this to the 1.5.0 milestone Aug 9, 2021
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.

The Seata Server dump stack will appear no permission.
4 participants