Skip to content

URL transcoder leaves the request unanswered when the backend call fails #1717

Open

Description

@SreeramaYeshwanthGowd

Describe the bug

URLTranscoderVerticle builds its response inside a Future chain that has no terminal failure
handler, so any failure in that chain leaves the request unanswered and the client waits until it
times out.

The chain is transcodeRequest.body().compose(...).compose(...) at
server/src/main/java/io/unitycatalog/server/URLTranscoderVerticle.java. If either stage fails, for
example because the request to the Armeria backend cannot be made, nothing writes to
transcodeRequest.response() and the connection stays open.

This matters because the transcoder is on the port users normally reach. UnityCatalogServer.main
starts Armeria on port + 1 and the transcoder on port, and compose.yaml publishes only 8080.

This is the residual case noted in #1716. That PR fixed the null body path, which was the cause of
#1046. It deliberately did not add a failure handler, since that is a new wire behaviour rather than
a guard.

To Reproduce

Steps to reproduce the behavior:

  1. Run the transcoder logic with the null body fix from [Server] Fix URL transcoder hanging on responses with no body #1716 already applied, pointing at a backend
    port with nothing listening on it.
  2. Send any request to the transcoder port.
  3. The request never completes.
$ curl -s -o /dev/null -w "http_code=%{http_code} time=%{time_total}s\n" --max-time 8 \
    "http://127.0.0.1:19080/api/2.1/unity-catalog/catalogs"
http_code=000 time=8.002384s
$ echo $?
28

Expected behavior

A failure in the chain returns a response to the client, so the request completes instead of hanging.
Something in the 502 or 500 family seems reasonable, but the status is worth agreeing on before
implementing.

System [please complete the following information]:

  • main at ed504dee
  • Vert.x 4.3.5, the version pinned in build.sbt

Additional context

Happy to send a PR once there is agreement on the status code to return.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions