Skip to content
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

Add env to disable worker restart #10664

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mhofman
Copy link
Member

@mhofman mhofman commented Dec 10, 2024

incidental

Description

Add an environment to control the restart of the vat worker when a snapshot is taken. This should have no impact on consensus, but we haven't actually tested this lately, and we used to have problems in the past.

Disable the forced restart in the loadgen CI test to exercise this potential source of divergence.

Security Considerations

None. A validator using this environment may fall out of consensus.

Scaling Considerations

Not restarting the worker has an impact on the performance of the worker over time, but given the limited amount of work the CI test does, it should not be noticeable.

Documentation Considerations

Since this config is fairly experimental, it is not currently documented anywhere. This is in line with similar XSNAP env.

Testing Considerations

Enabling this in CI

Upgrade Considerations

Part of chain software, but should not affect consensus.

@mhofman mhofman requested a review from a team as a code owner December 10, 2024 17:17
@mhofman mhofman requested a review from AgoricTriage December 10, 2024 17:17
@mhofman mhofman added the force:integration Force integration tests to run on PR label Dec 10, 2024
@mhofman mhofman requested a review from gibson042 December 10, 2024 18:54
@@ -315,6 +316,10 @@ export default async function main(
? vatTranscriptRetention !== 'operational'
: false;

const restartWorkerOnSnapshot = processValue.getBoolean({
envName: 'XSNAP_RESTART_ON_SNAPSHOT',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be documented in env.md.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this config is fairly experimental, it is not currently documented anywhere. This is in line with similar XSNAP env.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then let's document it as experimental. I don't like having environment variable sensitivity that can only be discovered by reading the code.

Comment on lines -310 to +311
* @property {import('./chain-main.js').CosmosSwingsetConfig} swingsetConfig
* TODO refactor to clarify relationship vs. import('@agoric/swingset-vat').SwingSetConfig
* --- maybe partition into in-consensus "config" vs. consensus-independent "options"?
* (which would mostly just require `bundleCachePath` to become a `buildSwingset` input)
* @property {number} [maxVatsOnline]
* @property {boolean} [restartWorkerOnSnapshot]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like a step in the wrong direction—I'd really like to move towards better categorization of launch inputs than just a flat object with way too many properties.

Copy link
Member Author

@mhofman mhofman Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree but right now passing the config itself for just picking a single consensus-independent option felt wrong too, especially because I didn't want this new option to be part of the cosmos driven config.

Also that same file used swingsetConfig to designate something else entirely, so removing stops the ambiguity

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fair, but the CosmosSwingsetConfig vs. SwingSetConfig problem still exists. I guess I'm fine with this refactoring if it doesn't lose the comment (or a variation thereof).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
force:integration Force integration tests to run on PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants