Open kim opened 2 weeks ago
Please feel free to suggest naming / terminology changes. I felt uninspired so stuck with ecru.
Also, I am unsure if we tracked energy in standalone before, or if I introduced it accidentally.
@kazimuth @RReverser It is somewhat mysterious to me how the repeated StandaloneEnv::init
with same database directory could possibly work. Is there something I'm missing, or was it just incidental that it worked?
In both cases, the database was inaccessible after the panic.
That sounds wrong, it should come up again (lazily). Will investigate…
Thanks for testing!
In both cases, the database was inaccessible after the panic.
That sounds wrong, it should come up again (lazily). Will investigate…
Disregard. It does in fact seem to come up again, I was just mistaking my quickstart-chat
being unable to connect due to stale credentials.
Make it so
HostController
manages both the module host (wasm machinery) and the database (RelationalDB
/DatabaseInstanceContext
) of spacetime databases deployed to a server.The
DatabaseInstanceContextController
(DBIC) is removed in the process.This allows to make database accesses panic-safe, in that uncaught panics will cause all resouces to be released and the database to be restarted on subsequent access. This is a prerequisite for #985.
It also allows to move towards storage of the module binary directly in the database / commitlog. This patch, however, makes some contortions in order to not introduce a breaking change just yet.
Expected complexity level and risk
2.5
Testing
panic!
in thedurability
crate's background tasks, which is triggered with some probability. Deploy a test module and access it using the CLI (call reducer, get logs, sql). Observe that the panic is triggered (in the server logs). Run another command and observe that it returns an error. Run it again and observe that the database restarts and the command succeeds. On a scale from 1-10, rate how confusing the error messages are. On a scale from 1-10, rate how confusing the fact is that the database does not eagerly restart.