Skip to content

fix(recommendation): set a deadline on catalog calls - #4232

Merged
julianocosta89 merged 2 commits into
open-telemetry:mainfrom
adityareddy-dev:recommendation-catalog-deadline
Nov 3, 2026
Merged

julianocosta89 merged 2 commits into
open-telemetry:mainfrom
adityareddy-dev:recommendation-catalog-deadline

Conversation

@adityareddy-dev

@adityareddy-dev adityareddy-dev commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Changes

A catalog that never replies can hold recommendation requests open indefinitely. Each catalog call now gets a fresh two-second deadline, configurable with RECOMMENDATION_CATALOG_TIMEOUT_MS.

The stalled-catalog regression failed before the change and passes with it. All seven recommendation tests and bootJar pass.

Merge Requirements

  • Changelog fragment added
  • Service README updated
  • No Helm chart changes required

@adityareddy-dev
adityareddy-dev requested a review from a team as a code owner November 2, 2026 22:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the change introducing configurable catalog-call deadlines to prevent indefinite recommendation request waits.

No open issues 🎉

What changed in this PR

This PR prevents unresponsive product catalogs from holding recommendation requests open indefinitely by applying a fresh, configurable deadline to each catalog call.

Changes:

  • Add a two-second default catalog timeout and reject non-positive timeout values.
  • Add regression coverage for stalled catalogs, including error telemetry checks.
  • Document RECOMMENDATION_CATALOG_TIMEOUT_MS and add a changelog entry.
File Description
src/​recommendation/​src/​test/​java/​oteldemo/​recommendation/​RecommendationServiceTests.java Add stalled-catalog regression coverage and bound test client calls.
src/​recommendation/​src/​main/​java/​oteldemo/​recommendation/​RecommendationService.java Validate timeout configuration and apply a deadline per catalog call.
src/​recommendation/​README.md Document the default timeout and environment variable override.
.chloggen/​recommendation-catalog-deadline.yaml Record the catalog deadline bug fix.

Review effort: Balanced

@julianocosta89
julianocosta89 added this pull request to the merge queue Nov 3, 2026
Merged via the queue into open-telemetry:main with commit e9e50d1 Nov 3, 2026
65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants