weaviate/weaviate · error
rangeable index for property
Error message
rangeable index for property %q could not be activated for in-memory serving: bucket %q not found post-swap, rebuild the index to repair it
What it means
After a reindex swap completes, the source bucket for a rangeable property must be present in the LSM store so its in-memory rangeable representation can be rebuilt. If `store.Bucket(bucketName)` returns nil and the context is NOT cancelled, this is a hard state divergence: the bucket that should have been promoted/loaded is missing post-swap. The migration does not fail (data on disk is intact and disk serving remains correct), but the shard is degraded — range queries for this property serve from disk instead of memory, and a degraded-rebuild metric is incremented.
Solutions
- Rebuild the index for the affected collection/property (as the message says): trigger a reindex so the bucket is recreated and promoted correctly.
- Check the shard's LSM directory on disk: if the bucket directory exists but is not loaded, restart the node — OnAfterLsmInit / ensureReindexBucketsLoadedForSwap will defensively load it.
- If the bucket directory is genuinely missing, restore from backup or reindex; do not hand-create empty bucket dirs.
- Inspect logs for an earlier interrupted runtimeSwap or 'reindex bucket not found' to find the root cause of the state divergence, and check the rangeable_rebuild_degraded metric for affected shard/property.
Example fix
// after an interrupted swap left the bucket unloaded, on the operator side: // 1. verify the dir exists ls /var/lib/weaviate/<index>/<shard>/lsm-kythe/<bucket-dir> // 2. restart weaviate so OnAfterLsmInit loads it; if dir is gone: // re-index the collection via GraphQL/REST (update the schema or use the repair/reindex flow)
Defensive patterns
Strategy: validation
Validate before calling
// verify all expected rangeable buckets are loaded before assuming a healthy shard:
store := shard.Store()
for _, prop := range rangeableProps {
if store.Bucket(strategy.SourceBucketName(prop)) == nil {
logger.Warnf("bucket for property %q not loaded; triggering defensive reload/reindex", prop)
}
} Type guard
func bucketLoaded(store *lsmkv.Store, name string) bool { return store.Bucket(name) != nil } Try / catch
if err := finalize(ctx, shard, props); err != nil {
var degraded *DegradedRebuildError
if errors.As(err, °raded) {
metrics.IncRangeableInMemoryRebuildDegraded(class, shard, degraded.Prop)
logger.Errorf("degraded to disk serving; schedule reindex: %v", err)
return nil // do not fail the committed migration
}
return err
} Prevention
- Never manually delete bucket directories under the shard's lsm path.
- After an unclean shutdown, check for 'not found post-swap' errors and rebuild affected indexes proactively.
- Keep the rangeable_rebuild_degraded metric alerting enabled per class/shard/property.
- Keep disk space healthy — full disks can abort bucket creation during swaps.
- Back up before schema migrations so missing buckets can be restored without data loss.
When it happens
Trigger: Triggered when `store.Bucket(bucketName)` is nil for a rangeable property after a bucket swap with a live context: the swap promoted a bucket that was later removed from the in-memory map, an interrupted runtimeSwap removed the bucket without persisting the sentinel, a property was dropped mid-migration, or the bucket dir is genuinely gone on disk.
Common situations: A previous crash/shutdown interrupted the swap midway leaving inconsistent in-memory vs on-disk bucket state; manual deletion or corruption of an LSM bucket directory under the shard's lsm path; version-upgrade recovery paths re-loading shards; operators deleting reindex/ingest bucket directories to reclaim disk space.
Related errors
- rangeable index for property
- adding prop ' ' to bucket
- adding prop ' ' to bucket
- adding prop
- adding prop
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/a1332234726e4e9d.
Report an issue: GitHub.
Appendix: source
Thrown at adapters/repos/db/inverted_reindex_task_generic.go:850
!shard.Index().Config.IndexRangeableInMemory {
return nil
}
store := shard.Store()
className := shard.Index().Config.ClassName.String()
shardName := shard.Name()
for _, propName := range props {
bucketName := t.strategy.SourceBucketName(propName)
bucket := store.Bucket(bucketName)
if bucket == nil {
if ctxErr := ctx.Err(); ctxErr != nil {
// Missing buckets have legitimate transient causes (shutdown
// draining, a property dropped mid-migration); only treat this
// as a hard failure once we know the caller isn't shutting down.
return fmt.Errorf("rangeable in-memory rebuild aborted for property %q: %w", propName, ctxErr)
}
err := fmt.Errorf(
"rangeable index for property %q could not be activated for in-memory "+
"serving: bucket %q not found post-swap, rebuild the index to repair it",
propName, bucketName,
)
logger.WithField("bucket", bucketName).Errorf("rangeable in-memory rebuild: %v", err)
monitoring.GetMetrics().IncRangeableInMemoryRebuildDegraded(className, shardName, propName)
continue
}
started := time.Now()
if err := t.rebuildRangeableRepFn(ctx, bucket); err != nil {
if ctxErr := ctx.Err(); ctxErr != nil {
// Wrap ctxErr too: it guarantees errors.Is(context.Canceled)
// works even if the underlying err doesn't itself wrap
// ctx.Err(); err is kept for diagnostics.
return fmt.Errorf("rangeable in-memory rebuild aborted for property %q: %w: %w", propName, ctxErr, err)
}
wrapped := fmt.Errorf(View on GitHub (pinned to 75aa4b6d11)