Skip to content

pekko: Improve PekkoRouteHolder#16390

Open
samwright wants to merge 12 commits intoopen-telemetry:mainfrom
samwright:fix-pekko-routeholder-immutable3
Open

pekko: Improve PekkoRouteHolder#16390
samwright wants to merge 12 commits intoopen-telemetry:mainfrom
samwright:fix-pekko-routeholder-immutable3

Conversation

@samwright
Copy link
Copy Markdown
Contributor

  • Give each Directive its own PekkoRouteHolder to allow concurrent access without causing problems like those described in NullPointerException and ArrayIndexOutOfBoundsException with pekko-http #15681. Only when there's a route match are the PekkoRouteHolders in that call stack combined.
  • Remove need for state queue
  • remove query params from tapir http.route, as required by otel convention
  • support Tapir's internal route concatenation feature

- Give each Directive its own PekkoRouteHolder to avoid concurrent access. Only when there's a route match are the PekkoRouteHolders in that call stack combined.
- Remove need for state queue
- remove query params from tapir http.route, as required by otel convention
- support Tapir's internal route concatenation feature
@samwright samwright requested a review from a team as a code owner March 5, 2026 09:28

This comment was marked as outdated.

samwright and others added 2 commits April 18, 2026 14:19
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
- Fix Nullable import
- Add volatile to fields accessed in different threads
- Move constructor to top of PekkoRouteHolder
- Use '.flatMap(routeHolder -> Optional.ofNullable(routeHolder.route()))' to make clear that `routeHolder.route()` can return `null`.
@samwright samwright requested a review from trask April 18, 2026 14:09
@trask
Copy link
Copy Markdown
Member

trask commented Apr 19, 2026

hey @samwright, fyi both of the above reviews from me were really from AI (based on proposal in #17889), sorry I thought I had mentioned that above, but apparently not

- LinkedList -> ArrayList + ArrayDeque
- no unnecessary onThrowable in advice
@samwright
Copy link
Copy Markdown
Contributor Author

hey @samwright, fyi both of the above reviews from me were really from AI (based on proposal in #17889), sorry I thought I had mentioned that above, but apparently not

That's cool - I had already guessed :-)

@samwright samwright requested a review from trask April 20, 2026 05:39
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.

3 participants