jayblanc opened a new pull request, #930:
URL: https://github.com/apache/unomi/pull/930

   ## Summary
   
   - This pull request backports 
[apache/unomi#746](https://github.com/apache/unomi/pull/746) 
([UNOMI-924](https://issues.apache.org/jira/browse/UNOMI-924)) to 
`unomi-3.0.x`. The commit is a cherry-pick of the merge commit `0c44c9bd` 
against its first parent.
   - On `unomi-3.0.x`, a second call to `/health/check` that arrives while a 
check runs gets a `RejectedExecutionException`, and the servlet returns HTTP 
500. A probe or a load balancer that calls the endpoint in parallel gets these 
errors on a healthy node.
   - `HealthCheckService.check()` now returns the last results from a cache 
that is refreshed at most once per second. Only one thread refreshes the cache, 
and a concurrent call gets the cached results.
   
   ## Differences from master
   
   - `UnomiManagementServiceImpl`: the change on master is a javadoc fix 
(`<h3>` to `<p><b>`). This javadoc does not exist on `unomi-3.0.x`, so the file 
keeps its `unomi-3.0.x` version.
   - `HealthCheckIT`: the import conflict is resolved with the imports of both 
sides. `testConcurrentHealthCheck` is adapted to this line, which returns 5 
checks (with `persistence`) and names the search engine check `elasticsearch`. 
On master, the test expects 4 checks and reads the name from `searchEngine`, 
which does not exist on this line.
   - The other files come across unchanged.
   
   ## Known limit, same as master
   
   The change removes the per-provider timeout: `HealthCheckService` calls 
`provider.execute()` directly, and the `timeout` configuration key is no longer 
read. If the search engine stops to answer but keeps the TCP connection open, 
the refresh thread waits with no limit. The endpoint then returns the last 
cached result. [UNOMI-924](https://issues.apache.org/jira/browse/UNOMI-924) has 
the details. This pull request keeps the master behaviour, so that both lines 
stay the same. A fix for this limit belongs on master first.
   
   ## Test plan
   
   - [x] `mvn -P integration-tests -pl itests -am -DskipTests install` on this 
branch builds.
   - [ ] `HealthCheckIT`, CI.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to