summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@oath.com>2018-01-23 10:25:58 +0000
committerTor Egge <Tor.Egge@oath.com>2018-01-23 10:25:58 +0000
commit68bb57d1b253a1186a629ffa2298f8e403cb2289 (patch)
tree8cbd2df2bc7f1f82d4c747dbbda1b27da75cb526 /searchlib
parente9d4490fc6843174e2409a8170cb0adf6bad6846 (diff)
Keep imported tensor attribute vector read guard live during access.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/tests/attribute/imported_attribute_vector/imported_attribute_vector_test.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/searchlib/src/tests/attribute/imported_attribute_vector/imported_attribute_vector_test.cpp b/searchlib/src/tests/attribute/imported_attribute_vector/imported_attribute_vector_test.cpp
index 98003a69cf1..114d0492c1a 100644
--- a/searchlib/src/tests/attribute/imported_attribute_vector/imported_attribute_vector_test.cpp
+++ b/searchlib/src/tests/attribute/imported_attribute_vector/imported_attribute_vector_test.cpp
@@ -585,7 +585,8 @@ struct TensorAttrFixtureBase : FixtureBase<useReadGuard> {
mappings);
}
Tensor::UP getTensor(DocId docId) {
- const ITensorAttribute & tensorAttr = dynamic_cast<const ITensorAttribute &>(*this->get_imported_attr());
+ auto imp_attr = this->get_imported_attr();
+ const ITensorAttribute & tensorAttr = dynamic_cast<const ITensorAttribute &>(*imp_attr);
return tensorAttr.getTensor(docId);
}
void assertNoTensor(DocId docId) {