weaviate/weaviate · error

pick entrypoint at level beginning

Error message

pick entrypoint at level beginning

What it means

At the start of doAtLevel, when there is no reusable entrypoint from cleanup state, the connector must pick an entrypoint node for the level's search (pickEntrypoint). Failure here means the connector could not establish a starting node and distance for searching this level — typically because the graph's entrypoint pointer is nil/inconsistent for the requested level.

Source

Thrown at adapters/repos/db/vector/hnsw/neighbor_connections.go:261

			}
			extraIDs = append(extraIDs, id)
			top--
			total++
		}
		for _, id := range n.pendingBuf {
			visited.Visit(id)
			err := n.processRecursively(id, results, visited, level, top)
			if err != nil {
				n.graph.pools.visitedLists.Return(visited)
				return err
			}
		}
		n.graph.pools.visitedLists.Return(visited)
		// use dynamic max connections only during tombstone cleanup
		maxConnections = n.maximumConnections(level)
	} else {
		if err := n.pickEntrypoint(); err != nil {
			return errors.Wrap(err, "pick entrypoint at level beginning")
		}
		eps := priorityqueue.NewMin[any](1)
		eps.Insert(n.entryPointID, n.entryPointDist)
		var err error

		results, err = n.graph.searchLayerByVectorWithDistancer(ctx, n.nodeVec, eps, n.graph.efConstruction,
			level, nil, n.distancer)
		if err != nil {
			return errors.Wrapf(err, "search layer at level %d", level)
		}

		n.graph.insertMetrics.findAndConnectSearch(before)
		before = time.Now()
	}

	if err := n.graph.selectNeighborsHeuristic(results, maxConnections-total, n.denyList); err != nil {
		return errors.Wrap(err, "heuristic")
	}

View on GitHub (pinned to 75aa4b6d11)

Solutions

  1. Retry the insert — a concurrent entrypoint update usually resolves the transient inconsistency.
  2. If all objects were deleted, expect the first re-insert to rebuild the entrypoint; ensure deletes/inserts are serialized per shard.
  3. Upgrade to a version with fixed entrypoint handling if cleanup/insert races reproduce.
  4. Reindex the collection if the entrypoint pointer stays inconsistent.
Defensive patterns

Strategy: retry

Try / catch

if err := bucket.Add(ctx, vector); err != nil {
	if strings.Contains(err.Error(), "pick entrypoint at level beginning") {
		// transient: entrypoint updated concurrently or graph was emptied
		time.Sleep(50 * time.Millisecond)
		return retry(ctx, vector)
	}
	return err
}

Prevention

When it happens

Trigger: findAndConnectNeighbors at a level where the graph entrypoint is missing (e.g. targetLevel above the entrypoint's level with inconsistent state), or during reconnectNeighboursOf when the graph entrypoint has been removed by tombstone cleanup concurrently.

Common situations: Tombstone cleanup racing with inserts; an index whose entrypoint node was deleted (all objects deleted) then new inserts arrive; version-specific bugs in entrypoint promotion/demotion.

Related errors


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