[CONTROLLER-1510] Convert messages to hold explicit sender references Created: 13/Apr/16  Updated: 25/Jul/23

Status: Confirmed
Project: controller
Component/s: clustering
Affects Version/s: None
Fix Version/s: None

Type: Improvement
Reporter: Robert Varga Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
is blocked by CONTROLLER-1506 CDS: refactor Shard to use behaviors Confirmed

 Description   

Our current messages do not hold a reference to sender actor, relying on Actor#getSender() to acquire it as part of processing. This has two problems:

1) it is not immediately obvious whether a message is really an RPC-style request and the receiver is expected to respond. We currently deal with this by having javadocs explaining what is supposed to happen, which is fine except we tend to pass down the sender to handlers of messages where that information is not needed, making it very easy to break the contract described by the message.

2) our long-term goal is to switch to using behaviors (and Akka Typed), where it is recommended to include the ActorRef in the message itself.

Switching to Akka Typed is going to involve code juggling and it would be good if it did not involve also changing our messages at the same time. Hence this issue should be addressed first, forming a baseline for the code refactor.



 Comments   
Comment by Robert Varga [ 13/Apr/16 ]

This actually covers two independent scopes:

  • sal-akka-raft
  • distributed datastore
  • EntityOwnershipService implementation
Comment by Robert Varga [ 13/Apr/16 ]

BUG-5626 is orthogonal to this, as for now we can fudge the sender, but it would be a lot cleaner if this were implemented.

Generated at Wed Feb 07 19:55:44 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.