Exclude cold module loads from guest deadlines
This commit is contained in:
@@ -131,6 +131,10 @@ available. If an artifact is cold or stale, dispatch compiles it on demand via
|
||||
Workers identify cached unit artifacts by nanosecond mtime, ctime, and size.
|
||||
Whole-second mtime alone is insufficient because a dependency-triggered rebuild
|
||||
can replace a wasm artifact within the same second as its prior build.
|
||||
Cold module compilation and deserialization are host work, so `load_unit()`
|
||||
refreshes the epoch deadline before its first guest call. Otherwise a component
|
||||
whose compilation outlasted the guest CPU budget would immediately trap in the
|
||||
following allocator/relocation call even though no guest loop consumed it.
|
||||
|
||||
---
|
||||
|
||||
@@ -330,9 +334,11 @@ header free-functions are `inline`. The wasm backend exposes only declarations
|
||||
`scripts/test_dependency_invalidation.sh`. The latter changes a transitive
|
||||
`#load`, then replaces a warmed worker artifact while preserving its
|
||||
whole-second mtime to prove both compiler and worker caches invalidate it.
|
||||
`scripts/test_cold_component_deadline.sh` separately compiles a deliberately
|
||||
cold component that exceeds the development epoch window and proves the
|
||||
parent request still renders it.
|
||||
|
||||
- **WebSocket end-to-end**: a headless client performs a raw WS handshake to
|
||||
`:HTTP_PORT` with path `/site/tests/websockets.ws.uce` (self-resolving
|
||||
`SCRIPT_FILENAME`) and asserts the `hello-ack` frame — exercising the full
|
||||
broker → worker → broker → client chain across process boundaries.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user