-
Notifications
You must be signed in to change notification settings - Fork 177
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
Module hotswapping #1147
Module hotswapping #1147
Conversation
@@ -240,7 +249,6 @@ impl HostController { | |||
energy_monitor: self.energy_monitor.clone(), | |||
}; | |||
let module_host = spawn_rayon(move || Self::make_module_host(mhc.host_type, mcc)).await?; | |||
module_host.start(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was not necessary anymore - we always start the module immediately now, so there's no point in having the start functionality anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So why are we starting it immediately now?
0f557b3
to
5d3717d
Compare
Bot test resulted in the client not receiving any more transactions after the database update was deployed. The client doesn't get disconnected but I can't call any reducers and it appears that I no longer receive any updates |
01f9788
to
3ba5470
Compare
Currently with this branch, calling update_database may invoke the |
I believe this is fine, or at least after #1186 lands. |
@@ -15,6 +16,7 @@ pub struct DatabaseInstanceContext { | |||
pub database: Database, | |||
pub database_instance_id: u64, | |||
pub logger: Arc<DatabaseLogger>, | |||
pub subscriptions: ModuleSubscriptions, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realize that I missed ModuleSubscriptions
in #1186. If the database panics during eval, it must be dropped and removed from the host controller.
Or maybe that doesn't matter, because if a read-only transaction panics we're in a hosed state anyway. Not sure.
@@ -240,7 +249,6 @@ impl HostController { | |||
energy_monitor: self.energy_monitor.clone(), | |||
}; | |||
let module_host = spawn_rayon(move || Self::make_module_host(mhc.host_type, mcc)).await?; | |||
module_host.start(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So why are we starting it immediately now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with quickstart-chat.
Code LGTM.
3ba5470
to
f1a6e0b
Compare
I think that was your change @kim - |
f1a6e0b
to
825bbda
Compare
Hm I don’t know that I did that — but we do need to start it, because we’re almost certainly going to call a reducer, no? |
It used to be |
cd203d2
to
6bf74b7
Compare
6bf74b7
to
15cdbeb
Compare
Description of Changes
This needs some testing. I feel like there's something obvious I'm missing here but this like, should work. At some point, I should write some smoketests about how clients behave when the module disconnects.
Expected complexity level and risk
3 (touches the websocket message actor - though I'm confident about that part. moreso just that I'm not sure that I preserve all the module lifecycle stuff.)
Testing