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

feat!: clusters improvements #109

Merged
merged 15 commits into from
Aug 21, 2023
Merged

feat!: clusters improvements #109

merged 15 commits into from
Aug 21, 2023

Conversation

robertsLando
Copy link
Member

@robertsLando robertsLando commented Aug 10, 2023

Fixes #85

BREAKING CHANGE: For users using this module with CLUTERS the db schema has changed for retained messages. There is a migration available in migrations.js named from9to10 that can be used to move all db to the new format. Also, if you are passing a conn to options (that is using clusters) now you also have to set cluster : true in options. To make this change back compatibile and faster in non cluster envs that option is used in order to use a different set of operations that only works in cluster envs

Copy link
Collaborator

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

).then((keys) => {
// keys: [['key1', 'key2'], ['key3', 'key4']]
// flatten the array
cb(null, keys.reduce((acc, val) => acc.concat(val), []))
Copy link
Collaborator

Choose a reason for hiding this comment

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

wrap this in a nexttick or the callback might be called twice in case of errors

Copy link
Member Author

@robertsLando robertsLando Aug 11, 2023

Choose a reason for hiding this comment

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

could you explain me why this could be called twice? In case one of the promises fails the catch should be thrown, also why should nextick fix that problem?

@robertsLando robertsLando changed the title feat: clusters improvements feat!: clusters improvements Aug 11, 2023
@alumowa
Copy link

alumowa commented Aug 21, 2023

Did some preliminary testing on this and seems to work 👍

@robertsLando
Copy link
Member Author

Thanks for the feedback @alumowa let me know when it's good to merge 👍🏻

@r3na
Copy link

r3na commented Aug 21, 2023

@robertsLando feel free to merge it. tks!!!

@robertsLando robertsLando merged commit 6948ba4 into master Aug 21, 2023
3 checks passed
@robertsLando robertsLando deleted the fix#85 branch August 21, 2023 14:40
@robertsLando
Copy link
Member Author

Done 🙏🏼

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

Successfully merging this pull request may close these issues.

[feat] Redis cluster load unbalanced across nodes
4 participants