convergencelabs / convergence-project

The project used for Convergence Project Management and Issue Reporting
https://convergence.io
42 stars 5 forks source link

Domain not ready after upgrade if clients are continually trying to connect #243

Closed mmacfadden closed 3 years ago

mmacfadden commented 3 years ago

Versions

Describe the Bug When the convergence server starts up, it will mark the domain status as needing an upgrade. When clients connect, they will cause the DomainSessionActor to initialize and it will read the domain status from the database and keep that in memory. Because the domain is in need of upgrade the clients will not be allowed to connect.

The DomainSession actor uses a receive timeout to determine when it needs to passivate. If clients are continually trying to connect, the DomainSessionActor will never passivate. Meanwhile, the administrator will upgrade the domain. The domain status in the database will be set to "ready". However, the DomainSessionActor will not be aware of this. When the DomainSessionActor passivates, or the server is restarted, then the DomainSessionActor will re-initialize from the database and be ready.

Fix The DatabaseManagerActor must broadcast a DomainStatusChanged message on the domainLifecyleTopic so that that DomainSessionActor becomes aware of its status as the upgrade proceeds (and completes).