weaviate/weaviate · error

get tenant status for %s/%s: %w

Error message

get tenant status for %s/%s: %w

What it means

During a multi-tenant collection export, Weaviate checks each tenant's activity status via the RAFT-managed tenantsManager before deciding whether to snapshot it. This error wraps any failure of that TenantsStatus lookup (e.g. RAFT/store errors), because a transient RAFT failure must fail the export rather than silently skipping the tenant and producing an incomplete export.

Source

Thrown at adapters/repos/db/export.go:321

			os.RemoveAll(r.SnapshotDir)
		}
	}
}

// shouldSkipTenant checks the RAFT-based tenant status and returns a skip
// reason if the tenant should not be exported. Returns ("", nil) if the
// tenant is exportable. Active and cold/inactive tenants are always
// exportable (cold tenants are snapshotted from disk without loading).
// Only offloaded, frozen, and transitional states are skipped.
//
// Errors from the status lookup are returned as errors (not skip reasons)
// so that the caller can fail the export rather than silently skipping
// the tenant — a transient RAFT failure should not produce an incomplete
// export.
func (i *Index) shouldSkipTenant(class *models.Class, shardName string) (string, error) {
	statuses, err := i.tenantsManager.TenantsStatus(class.Class, shardName)
	if err != nil {
		return "", fmt.Errorf("get tenant status for %s/%s: %w", class.Class, shardName, err)
	}
	status := statuses[shardName]

	switch status {
	case models.TenantActivityStatusHOT, models.TenantActivityStatusACTIVE,
		models.TenantActivityStatusCOLD, models.TenantActivityStatusINACTIVE:
		return "", nil
	default:
		return fmt.Sprintf("tenant status is %s", status), nil
	}
}

// snapshotLocalShardLocked snapshots a shard based on its local state.
// The caller must hold shardCreateLocks.RLock(shardName) for the duration
// of the call.
func (i *Index) snapshotLocalShardLocked(
	ctx context.Context, class *models.Class, isMT bool, shardName string,
	snapshotsRoot, snapshotName string,

View on GitHub (pinned to 75aa4b6d11)

Solutions

  1. Check RAFT cluster health (leader present, no elections) and retry the export
  2. Verify the node's schema/tenant state store is readable and not corrupted
  3. Retry the export after the transient cluster issue resolves; the error is deliberately fail-fast to avoid incomplete exports
  4. If persistent, inspect logs of the underlying TenantsStatus error (wrapped via %w) for the root cause
Defensive patterns

Strategy: retry

Validate before calling

// before exporting, confirm RAFT health
statuses, err := client.Tenants.Get(collectionName)
if err != nil { /* cluster state unavailable — postpone export */ }

Try / catch

err := group.Go(func() error {
  _, err := exportCollection(ctx, class)
  if strings.Contains(err.Error(), "get tenant status for") {
    // transient RAFT failure: back off and retry the whole export
    return retryWithBackoff(exportCollection)
  }
  return err
})

Prevention

When it happens

Trigger: Exporting (snapshotting) a multi-tenant collection when i.tenantsManager.TenantsStatus(class, shardName) returns an error — e.g. RAFT consensus unavailable, schema store read failure, or shard state store corruption.

Common situations: Cluster under RAFT leader election or network partition while running a tenant export; backup/snapshot jobs racing with tenant offload operations; schema store issues after node restart.

Related errors


AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04). Data as JSON: /api/errors/538175380d338806. Report an issue: GitHub.