demery-pivotal opened a new pull request #7129:
URL: https://github.com/apache/geode/pull/7129
PROBLEMS
- In test JVMs, `AvailablePortHelper` initialized its next candidate
port by selecting a random port within the available port range. This
often caused the test JVM's first few candidates to overlap with the
first few candidates of a child VM.
- `AvailablePortHelper` updated its next candidate port in non-atomic
way, making it possible for multiple threads to receive the same port
number.
SOLUTION
Change `AvailablePortHelper` to:
- Initialize its next candidate port to `AVAILABLE_PORT_LOWER_BOUND`
instead of randomly selecting an initial candidate.
- Update its next candidate port atomically by calling
`AtomicInteger.getAndUpdate(...)`.
--
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]