weaviate/weaviate · error

reading props: %w

Error message

reading props: %w

What it means

RunPrepareOnShard wraps failures from t.readPropsToReindex(rt) with the 'reading props' prefix. readPropsToReindex reads the reindex tracker / schema to determine which inverted-index properties must be re-indexed on this shard during the disk-heavy prep phase. A failure here means the property list could not be computed, so prep cannot proceed.

Source

Thrown at adapters/repos/db/inverted_reindex_task_generic.go:472

// the end of [runtimeSwap] after the atomic pointer flip.
func (t *ShardReindexTaskGeneric) RunPrepareOnShard(ctx context.Context, shard ShardLike) error {
	entry, err := t.enterDTMPhase(ctx, shard, "RunPrepareOnShard")
	if err != nil {
		return err
	}
	concreteShard, logger, rt := entry.shard, entry.logger, entry.rt

	// Idempotent fast-path: already merged means prep was already
	// completed (either by an earlier call in this process or by a
	// previous boot's runtimePrepare → markMerged).
	if rt.IsMerged() {
		logger.Debug("RunPrepareOnShard: already merged on disk; no-op")
		return nil
	}

	props, err := t.readPropsToReindex(rt)
	if err != nil {
		return fmt.Errorf("reading props: %w", err)
	}
	if len(props) == 0 {
		return fmt.Errorf("no props found for prep on shard %q", concreteShard.Name())
	}

	if err := t.ensureReindexBucketsLoadedForSwap(ctx, logger, concreteShard, props); err != nil {
		return fmt.Errorf("ensure buckets loaded: %w", err)
	}

	return t.runtimePrepare(ctx, logger, shard, rt, props)
}

// dtmPhaseEntry is the shared entry state of the DTM-scheduler-driven phase
// callbacks (RunPrepareOnShard / RunSwapOnShard).
type dtmPhaseEntry struct {
	shard  *Shard
	logger logrus.FieldLogger
	rt     reindexTracker

View on GitHub (pinned to 75aa4b6d11)

Solutions

  1. Read the wrapped underlying error to see whether it is a file-read, parse, or schema lookup failure
  2. Check the shard directory's migration/tracker files are readable and not corrupt; restore from a healthy node or backup if corrupt
  3. Verify the class still exists in the schema and the migration is still applicable; cancel stale migrations if the class changed
  4. Re-run RunPrepareOnShard — the merge phase is idempotent via sentinels
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-check: tracker file readable and class exists in schema
if _, err := os.Stat(shardDir + "/reindexed.mig"); err != nil { /* missing tracker: re-run earlier phases */ }
if !schema.ClassExists(className) { return fmt.Errorf("class %s gone; cancel migration", className) }

Try / catch

if err := task.RunPrepareOnShard(ctx, shard); err != nil {
	if strings.Contains(err.Error(), "reading props") {
		logger.Errorf("tracker/schema read failure on %s: %v", shard.Name(), err)
		// inspect tracker files, restore or re-trigger migration
	}
	return err
}

Prevention

When it happens

Trigger: Calling RunPrepareOnShard (directly or via the DTM scheduler paths dispatchMatrixDriveToMerged / dispatchMatrixDriveToTidied) when readPropsToReindex returns an error — typically because the reindex tracker's stored migration state is unreadable/corrupt or the schema lookup for the class fails.

Common situations: Corrupt .mig sentinel/tracker files on disk after a crash; schema class deleted concurrently while a migration is in flight; permission problems reading the tracker file after a restore/backup copy.

Related errors


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