risingwavelabs/risingwave · error · MetaError

Invalid worker: {0}, {1}

Error message

Invalid worker: {0}, {1}

What it means

Meta service rejected a request because the referenced worker is not registered or not recognized by the cluster manager. WorkerId identifies a compute/compactor/frontend node that must have registered with the meta before being addressed. Thrown by RPC handlers when a worker node id lookup or state validation fails.

Source

Thrown at src/meta/src/error.rs:69

    #[error("Hummock error: {0}")]
    HummockError(
        #[from]
        #[backtrace]
        HummockError,
    ),

    #[error(transparent)]
    RpcError(
        #[from]
        #[backtrace]
        RpcError,
    ),

    #[error("{0}")]
    PermissionDenied(String),

    #[error("Invalid worker: {0}, {1}")]
    InvalidWorker(WorkerId, String),

    #[error("Invalid parameter: {0}")]
    InvalidParameter(#[message] String),

    // Used for catalog errors.
    #[error("{0} id not found: {1}")]
    #[construct(skip)]
    CatalogIdNotFound(&'static str, String),

    #[error("table_fragment does not exist: id={0}")]
    FragmentNotFound(FragmentId),

    #[error("{0} named {1} already exists{under_creation}", under_creation = (.2).map(|_| " and is still being created").unwrap_or(""))]
    Duplicated(
        &'static str,
        String,
        // if under creation, take streaming job id, otherwise None

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Verify the worker is registered: list workers via risectl meta or `SHOW NODES`-style admin APIs and confirm the WorkerId exists.
  2. Restart the worker node so it re-registers with the meta service.
  3. If the meta was restored from backup, confirm worker registrations persisted; otherwise re-register all workers.
  4. Check network/partition issues causing the meta to expire the worker's liveness.

Example fix

// before
let status = meta_client.get_worker_status(stale_worker_id).await?; // InvalidWorker
// after
let workers = meta_client.list_workers().await?;
if workers.iter().any(|w| w.id == worker_id) {
    let status = meta_client.get_worker_status(worker_id).await?;
}
Defensive patterns

Strategy: validation

Validate before calling

let registered = meta_client.list_workers().await?;
if !registered.iter().any(|w| w.id == worker_id) {
    // re-register or refresh the worker id before calling
}

Type guard

fn is_known_worker(worker_id: WorkerId, workers: &[WorkerInfo]) -> bool {
    workers.iter().any(|w| w.id == worker_id)
}

Try / catch

match meta_result {
    Err(MetaError::InvalidWorker(id, msg)) => { /* re-register worker id, then retry */ }
    other => other?,
}

Prevention

When it happens

Trigger: Calls to meta RPCs (e.g. heartbeat, fragment or worker status APIs) referencing a WorkerId that was never registered, has been removed, or whose registration was invalidated by cluster restart.

Common situations: Stale worker metadata after meta node restart, worker removed via `risectl`/worker manager while still referenced, mismatched cluster state after failover, nodes joining with reused ids.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/8ff4347046a917af. Report an issue: GitHub.