weaviate/weaviate · error
get object by doc id: %w
Error message
get object by doc id: %w
What it means
uuidFromDocID resolves a doc ID to a UUID by looking up the object in the bucket via its secondary index (doc ID key). The GetBySecondary call failed, so the reverse lookup cannot proceed. Used by FindUUIDs (e.g. during geo/filtered scans and reference resolution).
Source
Thrown at adapters/repos/db/shard_read.go:1011
if err != nil {
return nil, errors.Wrap(err, "build inverted filter allow list")
}
return list, nil
}
func (s *Shard) uuidFromDocID(docID uint64) (strfmt.UUID, error) {
bucket, release, err := s.objectsBucket()
if err != nil {
return "", err
}
defer release()
docIDBytes := make([]byte, 8)
binary.LittleEndian.PutUint64(docIDBytes, docID)
res, err := bucket.GetBySecondary(context.TODO(), 0, docIDBytes) // TODO: context
if err != nil {
return "", fmt.Errorf("get object by doc id: %w", err)
}
prop, _, err := storobj.ParseAndExtractProperty(res, "id")
if err != nil {
return "", fmt.Errorf("parse and extract property: %w", err)
}
return strfmt.UUID(prop[0]), nil
}
func (s *Shard) batchDeleteObject(ctx context.Context, id strfmt.UUID, deletionTime time.Time) error {
// Wait outside RLock: initAsyncReplication holds the write lock while
// initialising, so blocking under RLock here would deadlock.
if err := s.waitForMinimalHashTreeInitialization(ctx); err != nil {
return err
}
s.asyncReplicationRWMux.RLock()View on GitHub (pinned to 75aa4b6d11)
Solutions
- Inspect the wrapped inner error for the underlying store failure
- Retry the query — transient errors occur if the shard is being dropped or migrated concurrently
- If persistent, verify shard integrity and restore from backup or rebuild
- Check disk health and node logs for LSM store issues
Defensive patterns
Strategy: retry
Validate before calling
// Ensure the target collection/shard is READY before doc-ID-dependent queries status, _ := client.Cluster().NodesStatus(ctx)
Try / catch
uuids, err := shard.FindUUIDs(ctx, docIDs)
if err != nil && strings.Contains(err.Error(), "get object by doc id") {
// transient if shard was dropping/migrating — retry with backoff
} Prevention
- Retry idempotent read paths with backoff around shard lifecycle events
- Monitor disk health and LSM store warnings in node logs
- Prevent concurrent shard deletion and heavy reads where possible
- Restore corrupted shards from backup instead of continuing reads
When it happens
Trigger: FindUUIDs iterating doc IDs where bucket.GetBySecondary(0, docIDBytes) fails — LSM store read error, bucket closed (shard dropping), or IO failure during the lookup.
Common situations: Shard being dropped/migrated concurrently while a query resolves doc IDs; disk IO errors; corruption of the secondary index (docID→UUID mapping) after an unclean shutdown.
Related errors
- already shut or dropped
- shard shutdown in progress
- shard drop in progress
- object bucket does not exist
- objects bucket not available (store shutting down?)
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/fb4349c4a253a5aa.
Report an issue: GitHub.