Skip to content

Refactor Worker and NodeMainInstance class to reuse code #29925

@joyeecheung

Description

@joyeecheung

Opening an issue to discuss about how to refactor the Worker and NodeMainInstance class to reuse code.

My current plan is to create a base class NodeInstance and try to strip out common code in WorkerData/Worker as well as NodeMainInstance in there, and then make Worker and NodeMainInstance inherit from NodeInstance.

This is useful in adding support for startup snapshots in workers and ContextifyContext - otherwise we need to repeat e.g. snapshot availability detection code in multiple places which can be tricky to maintain.

Refs: #29842

Metadata

Metadata

Assignees

No one assigned

    Labels

    processIssues and PRs related to the process subsystem.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions