TykTechnologies / tyk

Tyk Open Source API Gateway written in Go, supporting REST, GraphQL, TCP and gRPC protocols
Other
9.75k stars 1.09k forks source link

[TT-13508] Streams poor performance when reconnecting to a Streams API #6697

Closed buraksezer closed 3 weeks ago

buraksezer commented 3 weeks ago

User description

PR for https://tyktech.atlassian.net/browse/TT-13508

Changes:

Related PR: https://github.com/warpstreamlabs/bento/pull/125


PR Type

Bug fix, Enhancement


Description


Changes walkthrough πŸ“

Relevant files
Bug fix
manager.go
Correct stream removal logic in `removeStream` function   

ee/middleware/streams/manager.go
  • Fixed the removeStream function to use the correct key for stream
    removal.
  • Removed the combination of API ID with stream ID for stream
    identification.
  • +2/-4     
    Dependencies
    go.mod
    Update dependencies to latest versions                                     

    go.mod
  • Updated google.golang.org/grpc to version v1.67.0.
  • Updated github.com/warpstreamlabs/bento to a specific commit.
  • Updated various dependencies to newer versions.
  • +65/-45 
    Additional files (token-limit)
    go.sum
    ...                                                                                                           

    go.sum ...
    +1054/-103

    πŸ’‘ PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    buger commented 3 weeks ago

    :broken_heart: The detected issue is not in one of the allowed statuses :broken_heart:

    Detected Status Open :x:
    Allowed Statuses In Dev,In Code Review,Ready for Testing,In Test,In Progress,In Review :heavy_check_mark:

    Please ensure your jira story is in one of the allowed statuses

    github-actions[bot] commented 3 weeks ago

    PR Reviewer Guide πŸ”

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 4 πŸ”΅πŸ”΅πŸ”΅πŸ”΅βšͺ
    πŸ§ͺ No relevant tests
    πŸ”’ No security concerns identified
    ⚑ Recommended focus areas for review

    Refactoring
    The changes in the `removeStream` function simplify the stream ID handling by directly using `streamID` instead of constructing a `streamFullID`. This should be carefully tested to ensure that it does not affect the functionality where multiple APIs might share the same `streamID` but differ in `APIID`.
    github-actions[bot] commented 3 weeks ago

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    github-actions[bot] commented 3 weeks ago

    API Changes

    no api changes detected
    sonarcloud[bot] commented 3 weeks ago

    Quality Gate Failed Quality Gate failed

    Failed conditions
    0.0% Coverage on New Code (required β‰₯ 80%)

    See analysis details on SonarCloud