fix: escalate peer read timeouts after max retries — GH#4777#4780
Open
balhar-jakub wants to merge 2 commits into
Open
fix: escalate peer read timeouts after max retries — GH#4777#4780balhar-jakub wants to merge 2 commits into
balhar-jakub wants to merge 2 commits into
Conversation
Member
Author
QA + Security Review (Pavel's Lens) — APPROVED ✓Pavel's Lens Results
Acceptance Criteria Verification
Security Review
Verdict: APPROVED — Ready for merge. All acceptance criteria met, all 8 Pavel rules passed, no security concerns. |
Signed-off-by: Jakub Balhar <jakub@balhar.net> Signed-off-by: Jakub Balhar <jakub.balhar@broadcom.com>
8078a2e to
6021e16
Compare
|
achmelo
reviewed
Jul 10, 2026
| networkIssueCounter.fail(e.getLocalizedMessage()); | ||
| if (maybeReadTimeOut(e)) { | ||
| if (networkIssueCounter.hasReachedMax()) { | ||
| log.error("Socket read timeout has occurred repeatedly and reached the maximum retry count ({}). Batch replication tasks will be dropped as a permanent error and the peer will catch up via periodic registry sync.", networkIssueCounter.getCountText()); |
Member
There was a problem hiding this comment.
these 2 log messages are too similar and it would make it harder to debug. I would rephrase one of them and maybe also print the exception message, at least in the debug level
Member
Author
There was a problem hiding this comment.
If we use it ourselves, wouldn't it make sense to assign it the standard log id according to standard? Even for the original one.
I will change the text so it is further away as well.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Closes #4777
Problem
The
peer-node-read-timeout-mswas too short (15s), causing infinite retry loops under load on z/OS. Read timeouts were never escalated to permanent errors.Fix
networkIssueCounter.hasReachedMax()gate to read timeout handling inApimlPeerEurekaNodemaxPeerRetriesconsecutive read timeout failures →PermanentError(matching connection-failure behavior)peer-node-read-timeout-msfrom 15000 → 30000msFiles changed
apiml-common/.../ApimlPeerEurekaNode.java: hasReachedMax() gate in both process(task) and process(tasks)discovery-service/.../application.yml: timeout 15000 → 30000apiml/.../application.yml: timeout 15000 → 30000apiml-common/.../ReplicationTaskProcessorTest.java: 4 new tests (19 total)Build: PASS (19/19 tests)