forked from linera-io/linera-protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make application services keep running across queries (linera-io#2216)
* Store application service type in global variable Keep it running while the Wasm module is running. * Refactor to merge `impl` blocks There's no need to have a separate `impl` item. * Don't match on the single variant `enum` Remove an unnecessary level of indentation. * Restart the runtime before handling a query Ensure that the query context is properly configured to handle the query. * Don't pass ownership of the actor endpoints Allow them to be reused in other queries later. * Keep service runtime actor running But still reset the context before every query. * Don't restart service runtime actor unless needed Keep it running for as long as possible, so that the services also stay running for as long as possible. * Support any `ExecutionRuntimeContext` in test Allow registering `MockApplication`s with contexts different from `TestExecutionContext`. * Allow asserting for no leaked expected calls Prepare to test if all expected calls have been received. * Test if a service instance can handle many queries Ensure that a new service instance is not created for handling the subsequent query. * Test if new block restarts the service Ensure that the service does not live longer than its context. * Add a TODO for handling queries concurrently Place a reminder in the `ChainWorkerActor` to implement a potential performance improvement.
- Loading branch information
Showing
13 changed files
with
429 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.