-
Notifications
You must be signed in to change notification settings - Fork 43
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
Update slotmap on error in ToNode (sync API) #185
Update slotmap on error in ToNode (sync API) #185
Conversation
With this change, an iteration over the nodes with a ToNode command to each node can now include a slotmap update which restarts the iteration. I guess it can be a little inconvenient. Is there anything we can do about it? At the very least, it can be worth mentioning in the release notes, but maybe we can do something better? Possibilities for the node iterator when slotmap changes:
WDYT? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@bjosv you added this, right? |
Maybe we should add something about this new behaviour in the README? Lines 274 to 277 in 4dc5564
|
If I remember correctly the aim was to be able to cover and iterate all node at least once mainly for commands that couldn't be sent via the slot-based routing. That's why it was added at the same time as ToNode() commands. The alternative then was to stop/abort when the slotmap had changed, but I guess there wasn't a good way to know if the iteration was finished or not. The user would also have needed to reinit the iterator to make sure all nodes was covered.
I see in the PR that this was briefly discussed, but the simplistic way to be able to stack allocate, like a hiredis dict, was choosen. |
OK, thanks, so shall we stick with the current solution then? We have the event callback for updated slotmap now, which can also be used in addition to checking if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice.
OK, thanks, so shall we stick with the current solution then?
If we find a better alternative we can handle that in another PR.
Maybe either add some helper function to the existing iterator or create a new UniqueNodeIterator or something..
No description provided.