Tencent/WeKnora · error

failed to await load collection: %w

Error message

failed to await load collection: %w

What it means

Milvus collection bootstrap: LoadCollection was accepted but the async load task's Await failed, meaning the collection did not reach a loaded state within the wait (timeout or load error) and the bootstrap aborts before writes proceed.

Source

Thrown at internal/application/repository/retriever/milvus/repository.go:203

			log.Errorf("[Milvus] Failed to create collection: %v", err)
			return fmt.Errorf("failed to create collection: %w", err)
		}

		log.Infof("[Milvus] Successfully created collection %s", collectionName)
	}

	loadOpt := client.NewLoadCollectionOption(collectionName)
	if m.replicaNumber > 0 {
		loadOpt = loadOpt.WithReplica(m.replicaNumber)
	}
	loadTask, err := m.client.LoadCollection(ctx, loadOpt)
	if err != nil {
		log.Errorf("[Milvus] Failed to load collection: %v", err)
		return fmt.Errorf("failed to load collection: %w", err)
	}
	if err := loadTask.Await(ctx); err != nil {
		log.Errorf("[Milvus] Failed to await load collection: %v", err)
		return fmt.Errorf("failed to await load collection: %w", err)
	}

	// Mark as initialized
	m.initializedCollections.Store(dimension, true)
	return nil
}

func (m *milvusRepository) EngineType() types.RetrieverEngineType {
	return types.MilvusRetrieverEngineType
}

func (m *milvusRepository) Support() []types.RetrieverType {
	return []types.RetrieverType{types.KeywordsRetrieverType, types.VectorRetrieverType}
}

// EstimateStorageSize calculates the estimated storage size for a list of indices
func (m *milvusRepository) EstimateStorageSize(ctx context.Context,
	indexInfoList []*types.IndexInfo, params map[string]any,

View on GitHub (pinned to 988cbb0330)

Solutions

  1. Increase the await timeout or inspect load progress in Milvus
  2. Check query-node health and memory pressure
  3. Retry the ensureCollection bootstrap
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at internal/application/repository/retriever/milvus/repository.go:203 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02). Data as JSON: /api/errors/5271d77ff71c10f8. Report an issue: GitHub.