Skip to content

ServiceInvocationStreaming isn't effective in responses from service invocation #6246

@ItalyPaleAle

Description

@ItalyPaleAle

In what area(s)?

/area runtime

What version of Dapr?

1.10.x
current master

Description

The feature flag ServiceInvocationStreaming was added in 1.10 and should enable:

  • Using CallLocalStream for sidecar-to-sidecar communication
  • Responses from onDirectMessage return data as a stream

It appears that the second thing isn't actually working.

This seems to be related to the fact that when the HTTP API object is initialized (here), this line was not included:

IsStreamingEnabled: a.globalConfig.IsFeatureEnabled(config.ServiceInvocationStreaming),

Sadly, adding the line above isn't the end of the issue. Because HTTP requests go through a conversion from fasthttp to net/http (for applying the middlewares), and then back to fasthttp, when a handler calls reqCtx.Hijack() (which is necessary to use streaming), that is then lost. So setting IsStreamingEnabled would actually cause no data to be returned to the client.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't workingstaleIssues and PRs without response

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions