Skip to content

refactor(cluster): bring the calvin dispatch/scheduler and error files back under the 500-line limit #353

Description

@EnRaiha

Summary

Three files this branch touches exceed, or grow past, the house 500-line
non-test limit, so the local preflight (check C5) fails and was bypassed for the
fix push:

File base head
nodedb/src/control/cluster/calvin/scheduler/driver/core/dispatch.rs 504 542
nodedb/src/control/cluster/calvin/scheduler/driver/core/scheduler.rs 436 506
nodedb/src/error/types.rs 589 601

Work

  • extract the busy helpers (busy_backoff, note_dispatch_busy,
    note_dispatch_busy_shared) from scheduler.rs into a small core/busy.rs;
  • extract a self-contained piece of dispatch.rs (for example the active
    dispatch path) into its own module and thin the two dispatch sites;
  • move any impl Error helper block out of error/types.rs into a sibling
    module (the Error enum itself cannot be split);
  • target: every changed file at or under 500 non-test lines, preflight C5 green.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions