feat: add page_stress_testing as a subcommand of tiflash#5038
feat: add page_stress_testing as a subcommand of tiflash#5038ti-chi-bot merged 23 commits intopingcap:masterfrom
Conversation
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
|
/build |
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
|
/build |
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
|
run like: ./dbms/src/Server/tiflash stressworkload -M 0 -I true -V 3 -P stress -T 120
# or
ninja stress-workload
./dbms/src/Storages/Page/stress/workload/stress-workload -M 0 -I true -V 3 -P stress -T 120 |
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
| int StressWorkload::mainEntry(int argc, char ** argv) | ||
| { | ||
| { | ||
| // maybe due to sequence of linking, REGISTER_WORKLOAD is not visible to main function in dbms/src/Server/main.cpp |
There was a problem hiding this comment.
why __attribute__((constructor)) won't triggered before mainEntry?
There was a problem hiding this comment.
just as the comment says, maybe due to sequence of linking, REGISTER_WORKLOAD is not visible to main function in dbms/src/Server/main.cpp.
when we run in this way:
./dbms/src/Server/tiflash pageworkload -M 0 -I true -V 3 -P stress -T 120 __attribute__((constructor)) won't be triggered.
we run in this way:
ninja page-workload
./dbms/src/Storages/Page/stress/workload/page-workload -M 0 -I true -V 3 -P stress -T 120it will be triggered.
I still could not find the detail reason. 😢
There was a problem hiding this comment.
Maybe change the registration to be explicit like the function registerStorages? __attribute__((constructor)) is not a common way and depends on specific compiler behavior.
tiflash/dbms/src/Storages/registerStorages.cpp
Lines 38 to 56 in 5b61ae7
There was a problem hiding this comment.
I still could not find the detail reason. 😢
__attribute__((constructor)) doesn't work when we compile those files into a static lib https://stackoverflow.com/questions/1202494/why-doesnt-attribute-constructor-work-in-a-static-library
There was a problem hiding this comment.
Maybe change the registration to be explicit like the function
registerStorages?__attribute__((constructor))is not a common way and depends on specific compiler behavior.
That's how we've settled it. explicitly trigger them.
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
| add_executable (page-workload Main.cpp ${page-workload-src}) | ||
| target_link_libraries (page-workload dbms clickhouse_functions clickhouse-server-lib) | ||
| target_compile_options (page-workload PRIVATE -Wno-format -lc++) No newline at end of file |
There was a problem hiding this comment.
Seems the binary page_workload is useless. Do you think we still need this standalone binary? @jiaqizho
There was a problem hiding this comment.
It would increase the compile time of tiflash but can decrease the compile when we just want to run page-workload only. So maybe we can keep it just like dt-workload?
There was a problem hiding this comment.
In fact, I want to remove the binary of dt-workload...
There was a problem hiding this comment.
ok, I will remove both of them.
There was a problem hiding this comment.
Please delete useless code files as well: https://github.com/pingcap/tiflash/blob/master/dbms/src/Storages/DeltaMerge/tools/workload/Main.cpp
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
| include_directories (${CMAKE_CURRENT_BINARY_DIR}) | ||
|
|
||
| add_subdirectory (workload EXCLUDE_FROM_ALL) |
There was a problem hiding this comment.
Do we still need to keep this "stress" directory? Maybe move "dbms/src/Storages/Page/stress/workload" -> "dbms/src/Storages/Page/workload"?
There was a problem hiding this comment.
removed, the same as dbms/src/Storages/DeltaMerge/workload
JaySon-Huang
left a comment
There was a problem hiding this comment.
LGTM with minor comment
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
|
/merge |
|
@Lloyd-Pottiger: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: 247ae77 |
|
@Lloyd-Pottiger: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
Coverage for changed filesCoverage summaryfull coverage report (for internal network access only) |
What problem does this PR solve?
Issue Number: close #5037
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note