{"record":{"id":"9c9edf42967f11f3","repo":"weaviate/weaviate","slug":"objects-bucket-not-available-store-shutting-down","errorCode":null,"errorMessage":"objects bucket not available (store shutting down)","messagePattern":"objects bucket not available \\(store shutting down\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"adapters/repos/db/aggregator/vector_search.go","lineNumber":81,"sourceCode":"\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"aggregate search by vector: %w\", err)\n\t}\n\n\treturn idsFound, dists, nil\n}\n\nfunc (a *Aggregator) objectVectorSearch(ctx context.Context, searchVector models.Vector,\n\tallowList helpers.AllowList,\n) ([]*storobj.Object, []float32, error) {\n\tids, dists, err := a.vectorSearch(ctx, allowList, searchVector)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\t// Nil once Store.Shutdown has cleared the bucket map; fail fast.\n\tbucket := a.store.Bucket(helpers.ObjectsBucketLSM)\n\tif bucket == nil {\n\t\treturn nil, nil, fmt.Errorf(\"objects bucket not available (store shutting down)\")\n\t}\n\tobjs, err := storobj.ObjectsByDocID(bucket, ids, additional.Properties{}, nil, a.logger)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"get objects by doc id: %w\", err)\n\t}\n\treturn objs, dists, nil\n}\n\nfunc (a *Aggregator) buildAllowList(ctx context.Context) (helpers.AllowList, error) {\n\tvar (\n\t\tallow helpers.AllowList\n\t\terr   error\n\t)\n\n\tif a.params.Filters != nil {\n\t\tallow, err = inverted.NewSearcher(a.logger, a.store, a.getSchema.ReadOnlyClass, a.propIndices,\n\t\t\ta.classSearcher, a.stopwordProvider, a.shardVersion, a.isFallbackToSearchable,\n\t\t\ta.isRangeableLocallyReady, a.tenant, a.nestedCrossRefLimit, a.bitmapFactory).","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/adapters/repos/db/aggregator/vector_search.go#L63-L99","documentation":"During objectVectorSearch, the aggregator fetches the 'objects' LSM bucket from the store to materialize full objects for the doc IDs found by the vector search. After Store.Shutdown clears the bucket map, Bucket() returns nil; the code detects this and fails fast with a clear message instead of nil-pointer panicking.","triggerScenarios":"An in-flight aggregation (or gRPC/REST search) that reaches objectVectorSearch while the store is shutting down — e.g. server stopping, SIGTERM handling, or a shard being closed concurrently with a query.","commonSituations":"Queries issued during rolling restarts or deployments; health checks sending traffic before shutdown completes; load balancers not yet draining the node.","solutions":["Treat as transient: retry the query against another node once the shutdown completes or drain traffic before stopping the node.","Stop routing requests to the node before triggering shutdown (drain first, then stop).","If seen at steady state (not during shutdown), check for a bug where the store was closed prematurely and inspect logs for Store.Shutdown callers."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if strings.Contains(err.Error(), \"store shutting down\") {\n  // transient: fail over to another node / retry after readiness probe recovers\n}","preventionTips":["Drain traffic before stopping nodes (readiness probes + load balancer deregistration).","Do not send queries during rolling restarts."],"tags":["shutdown","lsmkv","race","lifecycle"],"backgroundTag":"store-shutting-down","analyzedSha":"75aa4b6d11f8818305aafd4440b4e32794f7ca04","analyzedAt":"2026-09-04T14:58:20.392Z","contentChangedAt":"2026-09-04T14:58:20.392Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}