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

Fix realm boot/shutdown handling #109

Open
andersk-auto opened this issue Feb 2, 2014 · 1 comment
Open

Fix realm boot/shutdown handling #109

andersk-auto opened this issue Feb 2, 2014 · 1 comment
Assignees
Milestone

Comments

@andersk-auto
Copy link

Ages ago, someone put #ifdef REALM_MGMT around two important pieces of code related to conveying information between realms about when a server is starting up or shutting down. Unfortunately, nothing is or ever has been built with REALM_MGMT defined, which means this communication never happens. Sort of...

realm_shutdown() sends notices to each foreign realm that this server is going away, along with a suggestion of another server to switch to. The sending of these "realm deathgrams" is conditionalized, but they are always processed when received. Incorrectly-copied comments notwithstaning, a realm deathgram is not the same as an HM deathgram, and does not cause any subscriptions to be removed. Rather, the only processing that occurs is to ACK the message and potentially switch to a new server.

At the other end of the universe, realm_wakeup() (or rlm_wakeup_cb()) is used to notify foreign realms that a server has come up. This allows other realms to switch servers, if necessary, and to resend any of their subscriptions to triples in the realm that just booted. These messages have the reverse problem -- REALM_BOOT notices are always sent, but part of their processing is conditionalized. Particularly, servers receiving a REALM_BOOT always consider switching servers, but if REALM_MGMT is not defined, they do not resend subscriptions or even ACK the REALM_BOOT notice (or forward it to other servers). This, of course, means that REALM_BOOT notices end up being retrasmitted repeatedly until all timeouts are exhausted.

At a minimum, we need to ACK and forward REALM_BOOT notices. We should also start sending realm deathgrams when appropriate. I think these are both fairly straightforward changes with easily-understood consequences. I'm somewhat less sure about resending other-realm subscriptions, whose utility is obvious but whose safety is less so.

@andersk-auto
Copy link
Author

Imported from trac issue 109. Created by jhutz@CS.CMU.EDU on 2013-03-18T20:22:47, last modified: 2013-10-06T21:18:49

@ghost ghost assigned jhutz Feb 2, 2014
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

No branches or pull requests

2 participants