Remove owner connection info in OnDeletedEntity
For Truly Distributed Systems
Brought to you by:
laha
From old ticket:
Maybe owner connection info and owner should be removed from entityproxy in OnDeletedEntity. The connection/owner can be different depending on timing, and we can't send an updated OnDeletedEntity to subscribers. This apply to entities that becomes ghosts.
Case:
- Handler A in connection A-con creates entity E1.
- Handler A unregister => subscribers get A-con in connection info and handler A in owner in OnDeletedEntity.
- Handler B in connection B-con register and rejects E1 when injected (makes a delete of E1) => subscribers that haven't received OnDeletedEntity, get B-con in connection info and handler B in owner in OnDeletedEntity. Subscribers that already received OnDeletedEntity will not get an updated OnDeletedEntity on E1.
This shows that subscribers will not get the same latest info for a entity state.
The solution is simply to remove the possibility to ask for connection and owner in a delete callback. A deleted state have no connection nor owner.
The connection info is really not meant to be more than advisory. No real functionality should depend on correct connection info.
Reopen if a real case ever appears.