Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: LiveQueryServer crashes using cacheAdapter on disconnect from Redis 4 server #9616

Merged

Conversation

Chilldev
Copy link
Contributor

Pull Request

Issue

Closes: #9432

Approach

Add empty handlers to redis client error, connect, reconnecting, ready events.

Copy link

Thanks for opening this pull request!

@Chilldev Chilldev changed the title Handle Redis createClient on error. fix: Redis 4 crash on disconnect. Feb 20, 2025
@mtrezza
Copy link
Member

mtrezza commented Feb 22, 2025

I guess you have seen it already - the CI fails for these tests:

1) RedisPubSub can create publisher
  - TypeError: Cannot read properties of undefined (reading 'on')

2) RedisPubSub can create subscriber
  - TypeError: Cannot read properties of undefined (reading 'on')

Copy link

codecov bot commented Feb 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.52%. Comparing base (ef68fb1) to head (5a507e7).
Report is 2 commits behind head on alpha.

Additional details and impacted files
@@           Coverage Diff           @@
##            alpha    #9616   +/-   ##
=======================================
  Coverage   93.52%   93.52%           
=======================================
  Files         186      186           
  Lines       14816    14831   +15     
=======================================
+ Hits        13856    13871   +15     
  Misses        960      960           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mtrezza mtrezza changed the title fix: Redis 4 crash on disconnect. fix: LiveQueryServer crashes using cacheAdapter on disconnect from Redis 4 server Feb 23, 2025
Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good; just to confirm, this is not a breaking change, right? For example, someone using Redis 3 can upgrade without any code changes.

@Chilldev
Copy link
Contributor Author

I borrowed the code from RedisCacheAdapter. So we should be fine.

@mtrezza mtrezza merged commit bbc6bd4 into parse-community:alpha Feb 24, 2025
24 checks passed
parseplatformorg pushed a commit that referenced this pull request Feb 24, 2025
# [8.0.0-alpha.12](8.0.0-alpha.11...8.0.0-alpha.12) (2025-02-24)

### Bug Fixes

* LiveQueryServer crashes using cacheAdapter on disconnect from Redis 4 server ([#9616](#9616)) ([bbc6bd4](bbc6bd4))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 8.0.0-alpha.12

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released-alpha Released as alpha version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LiveQueryServer crashes when configured to run with Redis cacheAdapter
3 participants