-
Notifications
You must be signed in to change notification settings - Fork 3.8k
CASSANDRA-20854: Support low-overhead async profiling #4487
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
base: trunk
Are you sure you want to change the base?
Conversation
|
|
||
| public interface AsyncProfilerMBean | ||
| { | ||
| void start(String event, String outputFormat, int timeout, String outputPath); |
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.
timeout - duration probably a better name for the parameter + a time unit as a a suffix would be helpful
outputPath - using a path is too dangerous from security point of view, a path to a data file or another file can be specified to cause a DoS (explicitly or using tricks like ../../.., so it is better to allow only a file name with explictly defined set of symbols to use (allowlist is safer than an denylist)
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.
I left it at timeout, as it is what the actual async profiler is using.
For the outputPath, that makes sense. Changing.
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.
Regarding timeout - yes, I mixed it up with -d option and what one is asprof option only.
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.
I think that "duration" is better terminology here. I did it like that.
src/java/org/apache/cassandra/tools/profiler/AsyncProfilerService.java
Outdated
Show resolved
Hide resolved
test/unit/org/apache/cassandra/tools/AsyncProfilerServiceTest.java
Outdated
Show resolved
Hide resolved
src/java/org/apache/cassandra/config/CassandraRelevantProperties.java
Outdated
Show resolved
Hide resolved
src/java/org/apache/cassandra/tools/profiler/AsyncProfilerService.java
Outdated
Show resolved
Hide resolved
src/java/org/apache/cassandra/tools/profiler/AsyncProfilerService.java
Outdated
Show resolved
Hide resolved
src/java/org/apache/cassandra/tools/profiler/AsyncProfilerService.java
Outdated
Show resolved
Hide resolved
src/java/org/apache/cassandra/tools/profiler/AsyncProfilerService.java
Outdated
Show resolved
Hide resolved
src/java/org/apache/cassandra/tools/profiler/AsyncProfilerService.java
Outdated
Show resolved
Hide resolved
52edd69 to
52c1ed0
Compare
Add enable/disable AsyncProfiler JVM flags Refactor Add output format option & initial tests Refactor & add tests Add tests for system properties & refactor Checkstyle fixes & switching airlift with picocli (CASSANDRA-17445) Add more tests Fix Picocli 'Profile' command integration Address feedback Changes.txt Remove not needed property Add missing licenses Apply feedback Fix help tests refactoring fix commands hardened validation and simplification of commands fix log dir fixed tests more fixes add purge command more hardening implement list and fetch Remove unused import more fixes added documentation fixed nodetool help output tests added status command introduced binary download of files in fetch command if necessary hardened code ability to specify duration in human format (e.g. 5m) improved error parsing ability to execute purge, list and fetch even with disabled profiler async-profiler is disabled by default added nodetool tests add startup check checking kernel parameters
98683de to
073febe
Compare
This is a follow up PR on top of
#4255