weaviate/weaviate · info
rangeable in-memory rebuild aborted for property %q: %w
Error message
rangeable in-memory rebuild aborted for property %q: %w
What it means
During a reindex migration, `rebuildRangeableInMemoryReps` tries to rebuild the in-memory roaring-set representation for a rangeable property's bucket after the swap. If the bucket is not present in the LSM store AND the context has been cancelled (e.g. graceful shutdown draining), the function aborts and returns the context error wrapped in this message. It is the cancellation branch: the code deliberately distinguishes 'bucket missing because we are shutting down' (transient, retried later) from a genuinely missing bucket.
Source
Thrown at adapters/repos/db/inverted_reindex_task_generic.go:848
) error {
if t.strategy.TargetStrategy() != lsmkv.StrategyRoaringSetRange ||
!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)View on GitHub (pinned to 75aa4b6d11)
Solutions
- Do nothing and restart the node cleanly — the migration is recovered on next startup via the recovery task (finalizeMigrationAfterRecovery); this error is transient by design.
- Check server logs for the shutdown/cancellation that preceded this (SIGTERM, drain, graceful shutdown) and confirm the reindex resumes after restart.
- Ensure the shard context is not being cancelled prematurely (check shard close ordering, request timeouts bound to the migration ctx).
- If it appears WITHOUT a shutdown, treat as the non-cancelled variant (errorIndex 1821): the bucket is genuinely missing — rebuild the index.
Defensive patterns
Strategy: retry
Validate before calling
// before relying on finalize results, check context health:
if err := ctx.Err(); err != nil {
// treat migration as transiently interrupted, not failed
return fmt.Errorf("migration interrupted: %w", err)
} Type guard
func isCancellation(err error) bool { return errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) } Try / catch
if err := runReindexSwap(ctx, shard, props); err != nil {
if isCancellation(err) {
logger.Debug("reindex interrupted by shutdown; recovery will resume")
return nil // transient ack, not permanent failure
}
return err
} Prevention
- Never mark a migration permanently FAILED when errors.Is(err, context.Canceled) is true.
- Use a background context (not request-scoped) for shard lifecycle/reindex work so client timeouts don't cancel migrations.
- Schedule restarts/rolling upgrades outside active reindex windows when possible.
- Monitor reindex task acks after restart to confirm the recovery path completed.
When it happens
Trigger: Triggered when, after a reindex bucket swap, `store.Bucket(bucketName)` returns nil for a rangeable property while `ctx.Err() != nil` — i.e. the caller's context was cancelled or its deadline expired during the migration. Raised from rebuildRangeableInMemoryReps via finalizeMigrationAfterRecovery, OnAfterLsmInitAsync, or runtimeSwap. Server shutdown, shard close, or a cancelled migration ack all produce it.
Common situations: Restarting or gracefully stopping Weaviate while a collection reindex (schema migration like a new filterable/rangeable property) is mid-flight; dropping a property while its migration is running; node shutdown draining shards during a rolling upgrade; an operator cancelling a DTM migration task.
Related errors
- rangeable in-memory rebuild aborted for property %q: %w: %w
- failed pausing compaction for shard '%s'
- already shut or dropped
- shard shutdown in progress
- store is read-only
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/ecd5deabf461510b.
Report an issue: GitHub.