-
Notifications
You must be signed in to change notification settings - Fork 212
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
annotate virtual/durable vrefs #6923
Conversation
8398973
to
1ba4d21
Compare
1ba4d21
to
0ea12f8
Compare
cc@mhofman @dckc because we might have some other tools (slogfile visualizer? OTEL telemetry conversion?) that are sensitive to the format of vrefs. Note that krefs remain unchanged. |
In the CDP world, I'd imagine this responsibility would be on the CDP, with the kernel un-aware of the differences, right? I see virtualized / durable objects as an internal CDP concern, like the vatstore is.
I don't believe any of these tools are sensitive to the format of the vref (in the otel case I think we only care about kref anyway) |
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.
LGTM
The duplication of code/changes between Swingset
and swingset-liveslots
is a bit unfortunate.
* virtual: BOOL, // true=>vref designates a "merely virtual" object (not durable, not ephemeral) | ||
* durable: BOOL, // designates a durable (not merely virtual, not ephemeral) |
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.
Out of curiosity, is there a reason you didn't go with virtual
including durable
instead of making them mutually exclusive ?
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 thought about that, but the documentation I came up with was too confusing, which tells me that the API would have been too confusing. If "virtual" means "virtual (and maybe also durable)", then "durable" means "virtual and durable", and that's not going to be an obvious split if you're just reading some code. Figured that explicit is better than implicit.
Yeah, when I split I figure that once the dust settles, I'll look around and see what code can be safely/usefully factored back out into shared packages. |
What is "CDP"? |
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.
Looks straightforward. My only concern is the proliferation of boolean tests all over the place getting more complicated -- that's not an objection to this set of changes per se, but more flagging a nascent concern about creeping complexity.
9c265f0
to
fa65192
Compare
fa65192
to
c4eeff3
Compare
This changes the vref format to reveal the ephemeral/virtual/durable status of each object to the kernel. The kernel doesn't normally care, but I'd like to move upgrade-time responsibility for abandoning merely-virtual objects from the vat to the kernel, which requires the kernel be capable of distinguishing them from durable objects. In this format, ephemeral objects exports are `o+NN`, merely-virtual object exports start with `o+vNN` (where `NN` names the KindID, and the vref always has an instance-ID suffix, so like `o+v34/2`), and durable object exports use `o+dNN`. As before, virtual/durable vrefs might include an additional facet-ID suffix: `o+v34/2:1`. Since the kernel doesn't yet care about details of the vref, very little code changed in packages/SwingSet: just a few tests that had stronger opinions about vrefs than they should be having. The kernel's copy of `parseVatSlots` grew the ability to distinguish virtual from durable, but nothing uses it yet. closes #6695 Co-authored-by: Mathieu Hofman <[email protected]>
c4eeff3
to
b859e92
Compare
fix: add 'v'/'d' virtual/durable annotations to vrefs
This changes the vref format to reveal the ephemeral/virtual/durable
status of each object to the kernel. The kernel doesn't normally care,
but I'd like to move upgrade-time responsibility for abandoning
merely-virtual objects from the vat to the kernel, which requires the
kernel be capable of distinguishing them from durable objects.
In this format, ephemeral objects exports are
o+NN
, merely-virtualobject exports start with
o+vNN
(whereNN
names the KindID, andthe vref always has an instance-ID suffix, so like
o+v34/2
), anddurable object exports use
o+dNN
. As before, virtual/durable vrefsmight include an additional facet-ID suffix:
o+v34/2:1
.Since the kernel doesn't yet care about details of the vref, very
little code changed in packages/SwingSet: just a few tests that had
stronger opinions about vrefs than they should be having. The kernel's
copy of
parseVatSlots
grew the ability to distinguish virtual fromdurable, but nothing uses it yet.
closes #6695