rabbitmq / ra

A Raft implementation for Erlang and Elixir that strives to be efficient and make it easier to use multiple Raft clusters in a single system.
Other
813 stars 96 forks source link

Add command reply modes for replying from a given member #314

Closed the-mikedavis closed 1 year ago

the-mikedavis commented 2 years ago

Proposed Changes

This is a new effect which works the same as prior reply effects but is only executed by the given server. A caller may wish to block until a command has replicated to an arbitrary server, for example if that server is on the local node. This new reply mode ensures that the call to process the command will only return when the command is replicated to that given node.

Types of Changes

What types of changes does your code introduce to this project? Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask on the mailing list. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

the-mikedavis commented 1 year ago

I left off adding the new reply-modes to notifications since they're currently batched in a way that makes it a little tricky to separate by reply-mode. I can leave that to the future if we find the right use-case for them or tackle this in a separate PR. What do you think @kjnilsson?

kjnilsson commented 1 year ago

I left off adding the new reply-modes to notifications since they're currently batched in a way that makes it a little tricky to separate by reply-mode. I can leave that to the future if we find the right use-case for them or tackle this in a separate PR. What do you think @kjnilsson?

yes that is fine, would you mind creating an issue for this capturing some of the context you've got for the future?