ci / build (11, macos-latest) failed could not be reproduced locally. Schedule delay 3 seconds, and assert unhealthyUpstream is not empty is also delay 3 seconds, these two times are too close. Suspect that schedue has not yet started, and the assert begins. I changed the Test and delayed the assert of the check results.
发件人: XiaoYu<mailto:[email protected]> 发送时间: 2022年3月24日 16:49 收件人: [email protected]<mailto:[email protected]> 主题: Re: PR#3100 When the service shutdown, remov it from the selector hi Jubo, you can check ci and fix it. This error should be caused by multi-threading, or the JDK version thanks~ Shi Jubo <[email protected]> 于2022年3月24日周四 15:11写道: > > Hi XiaoYu, > > I have created a new pr #3111:Filter out the virtual URIRegisterDTO when the > last service is down > But ci / build (11, macos-latest) failed again: > UpstreamCheckTaskTest.testRun:83 expected: <true> but was: <false> > I'm going to try it in jdk11. > > 发件人: XiaoYu<mailto:[email protected]> > 发送时间: 2022年3月24日 11:18 > 收件人: [email protected]<mailto:[email protected]> > 主题: Re: PR#3100 When the service shutdown, remov it from the selector > > hi Jubo, > > you can new pr to solve this problem~ > > Shi Jubo <[email protected]> 于2022年3月24日周四 11:00写道: > > > > Sorry, there was a problem with the non-http registration, when the last > > one service shutdown. I will solve it as soon as possible > > > > 发件人: Shi Jubo<mailto:[email protected]> > > 发送时间: 2022年3月24日 8:46 > > 收件人: [email protected]<mailto:[email protected]> > > 主题: 回复: PR#3100 When the service shutdown, remov it from the selector > > > > Hi XiaoYu, > > > > > > 1. There were no problems with the last check. > > > > 2. Configuration items have been added. > > > > 发件人: XiaoYu<mailto:[email protected]> > > 发送时间: 2022年3月23日 15:30 > > 收件人: [email protected]<mailto:[email protected]> > > 主题: Re: PR#3100 When the service shutdown, remov it from the selector > > > > hi Jubo, > > > > Thanks for your contribution. I already reviewed it. > > > > Your ideas and improvements are very good for me, but there are 2 > > small problems as follows > > > > 1. This pr Must ensure CI can pass. you can see this error [1]. > > 2. Can the following 1 hour be configured? > > > > > Set the status for the upstream service, when the service is registered, > > > set the status of the service list in the DB according to the service > > > list in the event message, and record the service status change time. Set > > > status false when the service deregistration. When the service changes or > > > the admin starts, the service that is unavailable for more than 1 hour is > > > removed to avoid the zombie service from existing in the DB all the time. > > > > > > > > [1] : > > https://github.com/apache/incubator-shenyu/runs/5655637482?check_suite_focus=true > > > > Shi Jubo <[email protected]> 于2022年3月23日周三 15:00写道: > > > > > > Hello! > > > > > > > > > For PR#3100 (Fixes > > > #3017<https://github.com/apache/incubator-shenyu/issues/3017> ) is > > > described below, please review the code. thank! > > > > > > Existing service registration and deregistration processing and problems: > > > 1. For the use of the registry, when there is a service started and > > > shutdown, all available services will be queried from the registry during > > > registration processing, and event messages will be published for service > > > registration. > > > 2. For http registration, when a service is started and shutdown, the > > > service can only be registered. > > > 3. The event subscriber is not sure what the service register type. When > > > a service is registered, the list of services in the event message is > > > processed, the list of services in the DB is queried, the list of > > > services in the event message is compared with the list of services in > > > the DB, and the services that do not exist in the former are added to the > > > latter to achieve the purpose of service registration. However, the > > > stopped service is not removed from the DB list, and if there is a > > > service offline, the gateway will still send the request to the node. > > > 4. Http registration, after the service shutdown, the dependent heartbeat > > > check finds that the service is unavailable, and then removes it from the > > > upstream service list. There is a timely removal that causes the gateway > > > to send requests to the downed node. > > > > > > Modification Notes: > > > 1. Active deregistration when the http service is stopped, > > > EventType=DELETED. Http registration and use registry registration to > > > differentiate processing. > > > 2. Set the status for the upstream service, when the service is > > > registered, set the status of the service list in the DB according to the > > > service list in the event message, and record the service status change > > > time. Set status false when the service deregistration. When the service > > > changes or the admin starts, the service that is unavailable for more > > > than 1 hour is removed to avoid the zombie service from existing in the > > > DB all the time. > > > 3. The new services and services with changed status are handed over to > > > the http registrar for processing. > > > 4. If it is http registration, the http registrar adds the service to the > > > service list according to the service status, or removes it from the > > > service list, and then updates the DB and sync to the service list cache. > > > Service registration processing ended. > > > 5. Non-http registration continues to be processed. If the service is > > > logged off, remove the service from the DB service list as the list of > > > available services (the current non-http registration does not exist, the > > > logic is retained, and can be removed), otherwise the service in the > > > event message is used as the list of available services. Based on the > > > list of available services and db services, generate the final service > > > list, update the DB and sync to the service list cache. > > > _______________________________________ > > > Jerbo99 > > >
