risingwavelabs/risingwave · error

iceberg pk-index sink coordinator for sink {} is not registe

Error message

iceberg pk-index sink coordinator for sink {} is not registered

What it means

IcebergPkIndexSinkManager::coordinator looks up the in-memory coordinator registered for a given sink id. If the sink id has no registered coordinator (never registered, already dropped, or lost after a meta restart), it returns this anyhow error. It surfaces on the pre_commit_epoch, commit_epoch and wait_epoch RPC paths.

Source

Thrown at src/meta/src/manager/iceberg_pk_index_sink/manager.rs:182

            }
        }
    }

    /// Drop every coordinator. Used at recovery time.
    pub fn reset(&self) {
        let mut coordinators = self.inner.coordinators.write();
        coordinators.clear();
        self.inner.committed_epochs.clear();
    }

    fn coordinator(&self, sink_id: SinkId) -> anyhow::Result<CoordinatorRef> {
        self.inner
            .coordinators
            .read()
            .get(&sink_id)
            .map(|(_pg, coord)| coord.clone())
            .ok_or_else(|| {
                anyhow!(
                    "iceberg pk-index sink coordinator for sink {} is not registered",
                    sink_id
                )
            })
    }

    fn partial_graph_of(&self, sink_id: SinkId) -> anyhow::Result<PartialGraphId> {
        self.inner
            .coordinators
            .read()
            .get(&sink_id)
            .map(|(pg, _coord)| *pg)
            .ok_or_else(|| {
                anyhow!(
                    "iceberg pk-index sink coordinator for sink {} is not registered",
                    sink_id
                )
            })

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Check whether the sink still exists in the catalog; if deleted, stop sending commits for it.
  2. Re-create/re-register the coordinator by restarting the sink worker so the manager rebuilds its entry, then retry.
  3. Verify meta single-active/leader routing so commit RPCs reach the meta node that owns the coordinator.
  4. If the coordinator was lost on meta restart, report persistent loss as a durability bug and recreate the sink.
Defensive patterns

Strategy: try-catch

Validate before calling

// caller-side check before committing
if !manager_has_coordinator(sink_id) {
    return Err(anyhow!("sink {} coordinator missing; re-register first", sink_id));
}

Try / catch

match manager.coordinator(sink_id) {
    Ok(coord) => coord.commit_epoch(epoch).await?,
    Err(e) if e.to_string().contains("not registered") => {
        // coordinator lost (failover/deleted sink): re-create or skip
        re_register_sink(sink_id).await?;
    }
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: pre_commit_epoch/commit_epoch/wait_epoch invoked with a sink_id absent from self.inner.coordinators — e.g. the RPC hit a meta node that did not host the coordinator, the sink was dropped, or the id is stale after a meta failover.

Common situations: Meta node failover/restart losing in-memory coordinator state while workers still reference the sink; sink deleted while a commit RPC is in flight; non-leader meta node receiving the RPC.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


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