diff --git a/searchlib/src/vespa/searchlib/queryeval/blueprint.cpp b/searchlib/src/vespa/searchlib/queryeval/blueprint.cpp index 6a9527057151..8fee02f6e50b 100644 --- a/searchlib/src/vespa/searchlib/queryeval/blueprint.cpp +++ b/searchlib/src/vespa/searchlib/queryeval/blueprint.cpp @@ -50,6 +50,8 @@ void maybe_eliminate_self(Blueprint* &self, Blueprint::UP replacement) { //----------------------------------------------------------------------------- +thread_local Blueprint::Options Blueprint::_opts; + Blueprint::HitEstimate Blueprint::max(const std::vector &data) { diff --git a/searchlib/src/vespa/searchlib/queryeval/blueprint.h b/searchlib/src/vespa/searchlib/queryeval/blueprint.h index a26e8922d6b6..6be2d356fef4 100644 --- a/searchlib/src/vespa/searchlib/queryeval/blueprint.h +++ b/searchlib/src/vespa/searchlib/queryeval/blueprint.h @@ -85,8 +85,7 @@ class Blueprint private: static Options &thread_opts() noexcept { - thread_local Options opts; - return opts; + return _opts; } struct BindOpts { Options prev; @@ -244,6 +243,7 @@ class Blueprint uint32_t _id; bool _strict; bool _frozen; + thread_local static Options _opts; protected: virtual void notifyChange() {