dgraph-io/dgraph · error
the Alpha that served that task is not available
Error message
the Alpha that served that task is not available
What it means
After extracting the Raft ID from the task ID, TaskStatusOverNetwork looks through the cluster membership for the Alpha whose Raft member ID matches; if none matches (addr stays empty), it concludes the Alpha that served the task is gone and returns this error. The task's status cannot be fetched because the owning server is no longer part of the group.
Source
Thrown at worker/queue.go:56
// Skip the network call if the required Alpha is me.
myRaftId := State.WALstore.Uint(raftwal.RaftId)
if raftId == myRaftId {
worker := (*grpcWorker)(nil)
return worker.TaskStatus(ctx, req)
}
// Find the Alpha with the required Raft ID.
var addr string
for _, group := range groups().state.GetGroups() {
for _, member := range group.GetMembers() {
if member.GetId() == raftId {
addr = member.GetAddr()
}
}
}
if addr == "" {
return nil, fmt.Errorf("the Alpha that served that task is not available")
}
// Send the request to the Alpha.
pool, err := conn.GetPools().Get(addr)
if err != nil {
return nil, errors.Wrapf(err, "unable to reach the Alpha that served that task")
}
client := pb.NewWorkerClient(pool.Get())
return client.TaskStatus(ctx, req)
}
// TaskStatus retrieves metadata for a given task ID.
func (*grpcWorker) TaskStatus(ctx context.Context, req *pb.TaskStatusRequest,
) (*pb.TaskStatusResponse, error) {
taskId := req.GetTaskId()
meta, err := Tasks.get(taskId)
if err != nil {
return nil, errView on GitHub (pinned to 759e242be6)
Solutions
- Poll each remaining Alpha directly or check logs on the removed Alpha to learn the task's outcome
- Re-run the backup/export operation if the originating Alpha is unrecoverable
- Restore cluster membership consistency and verify all Alphas are registered, then retry
- Treat the task ID as stale and obtain a fresh task ID from a new mutation
Example fix
// before
meta, err := worker.TaskStatusOverNetwork(ctx, req)
// after
meta, err := worker.TaskStatusOverNetwork(ctx, req)
if err != nil && strings.Contains(err.Error(), "not available") {
// originating Alpha left the cluster; re-run the task
id, err := queue.Enqueue(newReq)
} Defensive patterns
Strategy: fallback
Validate before calling
// Check the target raftId exists in membership before querying
raftId := req.GetTaskId() >> 32
if !membershipContains(raftId) {
return fmt.Errorf("originating alpha (raft %d) no longer in cluster", raftId)
} Type guard
func originAlphaAvailable(taskID uint64, members []Member) bool {
raftID := taskID >> 32
for _, m := range members {
if m.GetId() == raftID { return true }
}
return false
} Try / catch
meta, err := worker.TaskStatusOverNetwork(ctx, req)
if err != nil && strings.Contains(err.Error(), "not available") {
meta = nil // fall back to re-running the task or checking logs
} Prevention
- Persist task outcomes durably if you must survive cluster re-provisioning
- Avoid querying task IDs older than the last cluster membership change
- Keep cluster membership stable across task lifetimes
When it happens
Trigger: Querying the status of a task whose task ID encodes a raftId (taskId >> 32) that is not present in the current membership list — e.g. the Alpha that ran the task was removed, replaced, or its Raft ID changed.
Common situations: Cluster was resized/re-provisioned after the task started; an Alpha was permanently removed and re-added (new Raft ID); querying an old task ID against a brand-new cluster; ZooKeeper/membership data stale in older Dgraph deployments.
Related errors
- group: [%d] is not a known group
- namespace: %d. No tablet found for: %s
- Tablet to be moved: [%v] is not being served
- Unable to reach leader of group: %d
- unique validation failed to fetch schema for predicates %v
AI-assisted analysis of dgraph-io/dgraph@759e242be6 (2026-09-01).
Data as JSON: /api/errors/60612dffe5b2bf41.
Report an issue: GitHub.