-
Notifications
You must be signed in to change notification settings - Fork 217
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
fix(swingset): make slog deliveryNum match transcript position #7550
Conversation
fd5a0cd
to
dce7bca
Compare
cc @mhofman you'll probably want to be aware of this w.r.t. OTEL and telemetry stuff |
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
dce7bca
to
f3dddef
Compare
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.
Nice and clean. Otel logic doesn't care about the content.
https://github.com/Agoric/agoric-sdk/actions/runs/4838026300/jobs/8622248431?pr=7550 might beg to differ, but it might be a transient failure of the Chain Deployment Test. I'll kick it and see if it fails a second time. |
Oh that might be a bug in the loadgen! Edit: I don't see any loadgen error, but a suspicious cosmos error on the client side:
|
Actually the chain seem to have stopped producing blocks, will check the logs. Oh no, log collection is busted! Will reproduce locally |
When I added pseudo-deliveries to the transcript in #7484, I forgot to update the slog entry `deliveryNum` counter to match. As result, the `startVat` was deliveryNum 0 but transcript position 1 (since 0 is the `initialize-worker`). The gap grew by 2 after every snapshot save/load event pair. We don't slog the pseudo-deliveries as `.type: 'deliver'` (they're recorded other ways). While it will be weird to have gaps in the slogfile's `deliveryNum` sequence, I think it's better to maintain easy correlation between the slog and the transcript. So this changes `vatKeeper.nextDeliveryNum()`. Previously, that function maintained a separate counter (in `kvStore`) for each vat, which was only used by slog entries. Now, it queries the transcriptStore, with `getCurrentSpanBounds().endPos`. This is only incremented when we add an entry to the transcript, so the tests of `nextDeliveryNum()`'s auto-increment feature were updated too. closes #7549
f3dddef
to
a29274b
Compare
@Mergifyio refresh |
✅ Pull request refreshed |
When I added pseudo-deliveries to the transcript in #7484, I forgot to update the slog entry
deliveryNum
counter to match. As result, thestartVat
was deliveryNum 0 but transcript position 1 (since 0 is theinitialize-worker
). The gap grew by 2 after every snapshot save/load event pair.We don't slog the pseudo-deliveries as
.type: 'deliver'
(they're recorded other ways). While it will be weird to have gaps in the slogfile'sdeliveryNum
sequence, I think it's better to maintain easy correlation between the slog and the transcript.So this changes
vatKeeper.nextDeliveryNum()
. Previously, that function maintained a separate counter (inkvStore
) for each vat, which was only used by slog entries. Now, it queries the transcriptStore, withgetCurrentSpanBounds().endPos
. This is only incremented when we add an entry to the transcript, so the tests ofnextDeliveryNum()
's auto-increment feature were updated too.closes #7549