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

Redis db connection for global state is lost when node-red canvas is refreshed #2

Open
cmerchant opened this issue Nov 7, 2019 · 3 comments

Comments

@cmerchant
Copy link

cmerchant commented Nov 7, 2019

We are trying to make use of the plugin to allow global context to be saved and retrieved from our Redis db. It works fine until there is a browser refresh of the node-red canvas. After that, the state can no longer be retrieved from the database. Our only work around to force a reconnection is to restart the node-red container and reestablish the browser session.

@cmerchant cmerchant changed the title Redis db connection for global state is lost when node-red canvass is refreshed Redis db connection for global state is lost when node-red canvas is refreshed Nov 7, 2019
@knolleary
Copy link
Member

That is strange - the context storage plugin should be completely independent of what the editor is doing.

It's also a good reminder that none of the code has actually been reviewed, merged or supported by the project yet.

@cmerchant
Copy link
Author

We think we know the issue and have a repro. If we lose connection to redis for any reason, the plugin does not have a retry strategy defined. It is explicitly set to undefined in the plugin code (line 179 index.js). Is there any reason for this setting? We forked the repository and commented out this code and no longer see the issue. Once networking is restored the default retry strategy in the redis client reestablishes the connection to the db.

@knolleary
Copy link
Member

That's a good question to add as a review comment on #1. As I said, I haven't reviewed this code yet, so I'm grateful for any comments you have to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants