parse-community / Parse-SDK-JS

The JavaScript SDK for Parse Platform
https://parseplatform.org
Apache License 2.0
1.31k stars 599 forks source link

fix: `LiveQueryClient.resubscribe` with Parse Server 7 causes many open connections #2184

Closed dplewis closed 2 weeks ago

dplewis commented 3 weeks ago

Pull Request

Issue

The fields attribute was changed to keys in Parse Server 7, watch was added in version 6. Resubscribing doesn't subscribe to the same query as the initial subscription. It was discovered that resubscribing with fields on version 7 will caused resubscribing every second which lead to many connections to the server ultimately resulting in a crash.

Closes: https://github.com/parse-community/Parse-SDK-JS/issues/2180

Approach

Tasks

parse-github-assistant[bot] commented 3 weeks ago

Thanks for opening this pull request!

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (d76328c) to head (46a7718). Report is 2 commits behind head on alpha.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## alpha #2184 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 64 64 Lines 6364 6365 +1 Branches 1535 1506 -29 ========================================= + Hits 6364 6365 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mtrezza commented 2 weeks ago

@dplewis changed PR title to describe the issue; is the new title ok?

dplewis commented 2 weeks ago

The title is perfect!

parseplatformorg commented 2 weeks ago

🎉 This change has been released in version 5.2.0-alpha.3

parseplatformorg commented 2 weeks ago

🎉 This change has been released in version 5.2.0-beta.1

parseplatformorg commented 2 weeks ago

🎉 This change has been released in version 5.2.0