-
Notifications
You must be signed in to change notification settings - Fork 409
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
Test: Mock TiFlash compute service and dispatch MPPTask to single service. #5450
Conversation
[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. Reviewer can indicate their review by submitting an approval review. |
@@ -157,7 +157,8 @@ ::grpc::Status FlashService::DispatchMPPTask( | |||
{ | |||
CPUAffinityManager::getInstance().bindSelfGrpcThread(); | |||
LOG_FMT_DEBUG(log, "Handling mpp dispatch request: {}", request->DebugString()); | |||
if (!security_config.checkGrpcContext(grpc_context)) | |||
// For MPP test, we don't care about security config. | |||
if (!context.isMPPTest() && !security_config.checkGrpcContext(grpc_context)) |
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.
The security check will fail in mpp test?
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.
Yes, because I didn't mock anything related to the security_config.
{ | ||
non_test, | ||
mpp_test, | ||
executor_test |
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.
What's the difference between mpp_test
and executor_test
?
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.
mpp_test will run FlashService using the actual ExchangeReceiver/Sender to run Tasks.
executor_test only run in local with MockExchangeReceiver/Sender.
dbms/src/Server/MockComputeServer.h
Outdated
{ | ||
throw Exception("Exception happens when start grpc server, the flash.service_addr may be invalid, flash.service_addr is " + Debug::LOCAL_HOST, ErrorCodes::IP_ADDRESS_NOT_ALLOWED); | ||
} | ||
LOG_FMT_DEBUG(log, "Flash grpc server listening on [{}]", Debug::LOCAL_HOST); |
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.
Why can't reuse FlashGrpcServerHolder
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.
The FlashGrpcServerHolder is in Server.cpp. But Server.cpp is too heavy, and Server.cpp relies on Poco::Util::ServerApplication which can not easily manage the lifetime of Service because it should run in main() function, so I just simplify it in order to get a better management of FlashService.
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.
The FlashGrpcServerHolder is in Server.cpp. But Server.cpp is too heavy, and Server.cpp relies on Poco::Util::ServerApplication which can not easily manage the lifetime of Service because it should run in main() function, so I just simplify it in order to get a better management of FlashService.
In future, we will run multiple services in one gtest, so IMO it's better to simplify it.
Blocked, I will split FlashGrpcServerHolder from Server.cpp to an separate file |
/hold |
/unhold |
/run-all-tests |
1 similar comment
/run-all-tests |
/run-unit-tests |
1 similar comment
/run-unit-tests |
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
/run-integration-test |
/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. Instructions 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. Commit hash: 78dccd3
|
/run-all-tests |
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
What problem does this PR solve?
Issue Number: ref #4609
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note