Test: Mock TiFlash compute service and dispatch MPPTask to single service.#5450
Test: Mock TiFlash compute service and dispatch MPPTask to single service.#5450ti-chi-bot merged 36 commits intopingcap:masterfrom
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. DetailsReviewer can indicate their review by submitting an approval review. |
| 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.
The security check will fail in mpp test?
There was a problem hiding this comment.
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.
What's the difference between mpp_test and executor_test?
There was a problem hiding this comment.
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.
Why can't reuse FlashGrpcServerHolder
There was a problem hiding this comment.
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.
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 filesCoverage summaryfull 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. 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: 78dccd3 |
|
/run-all-tests |
Coverage for changed filesCoverage summaryfull 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