-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prohibit changes to durable-Kind stateShape during upgrade
When a vat upgrade provides a new definition for a pre-existing durable Kind, it can supply a `stateShape` option that might not be compatible with one established by the previous incarnation. The long-term issue is how to manage "schema upgrades", as the permissible/desired shape of the virtual-object `state` data changes over versions. For now, our main concern is that userspace doesn't create a situation where reading a `state` property causes an error, because the new `stateShape` rejects values that were recorded by an earlier version. The short-term fix is to insist that each new incarnation defines the Kind with exactly the same `stateShape` as its predecessor. This check is performed by comparing the serialized/marshalled capdata of `stateShape` against that of the earlier version, which is convenient but overly strict (e.g. the properties must be defined in the same order). If violated, the new-version `buildRootObject` will throw an error as it calls `defineDurableKind`. refs #7337
- Loading branch information
Showing
4 changed files
with
130 additions
and
9 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
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