Skip to content

Resource not sent on successive get request #79

@jirenius

Description

@jirenius

Issue

In case a client get request is immediately followed by another client get or subscribe request, while the first request is still collecting resources, the response for the second request may not contain the resources that was included in the response to the first request.

Since any resource sent in a response to a client get request should not be considered subscribed, any successive get or subscribe request should resend those resources if needed.

How to recreate

Assume we have a resource, test.a, which has a resource reference to another resource, test.b.

  1. Client sends request: get.test.a
  2. Resgate sends NATS request: get.test.a
  3. Client sends request: get.test.b
  4. Resgate gets result from request 3)
  5. Resgate sends NATS request: get.test.b
  6. Resgate gets result from request 4)
  7. Resgate responds to request 1), including both test.a and test.b
  8. Resgate responds to request 3) with no resource data, wrongly assuming client already has test.a

Impact

The bug has no security impact, and low impact on usage as it only affects a get request corner case. In addition, get requests are currently not used by any known client. ResClient only uses subscribe requests to fetch data, and is therefor unaffected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions