summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@oath.com>2018-06-06 11:40:05 +0000
committerTor Egge <Tor.Egge@oath.com>2018-06-06 11:43:05 +0000
commit2b520727953523267c5e7cd3e652f255d62570b4 (patch)
tree0311d6c6f4946e27d2cfad2da25e1a119504a506 /searchcore
parentfb2953c3ae1fa3a857db1f78f5b1c466945bbd89 (diff)
Adjust naming: compoundAttribute -> structFieldAttribute.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_test.cpp4
-rw-r--r--searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp26
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.h12
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/i_attribute_writer.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/fast_access_feed_view.cpp2
6 files changed, 25 insertions, 25 deletions
diff --git a/searchcore/src/tests/proton/attribute/attribute_test.cpp b/searchcore/src/tests/proton/attribute/attribute_test.cpp
index 634f69a3820..206e53e6267 100644
--- a/searchcore/src/tests/proton/attribute/attribute_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attribute_test.cpp
@@ -868,7 +868,7 @@ struct StructArrayFixture : public StructFixtureBase
StructArrayFixture::~StructArrayFixture() = default;
-TEST_F("require that update with doc argument updates compound attributes (array)", StructArrayFixture)
+TEST_F("require that update with doc argument updates struct field attributes (array)", StructArrayFixture)
{
auto doc = f.makeDoc(10, {11, 12});
f.put(10, *doc, 1);
@@ -926,7 +926,7 @@ struct StructMapFixture : public StructFixtureBase
}
};
-TEST_F("require that update with doc argument updates compound attributes (map)", StructMapFixture)
+TEST_F("require that update with doc argument updates struct field attributes (map)", StructMapFixture)
{
auto doc = f.makeDoc(10, {{1, 11}, {2, 12}});
f.put(10, *doc, 1);
diff --git a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
index 5d040024e63..c6b1cc7363c 100644
--- a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
@@ -389,7 +389,7 @@ struct MyAttributeWriter : public IAttributeWriter
}
void onReplayDone(uint32_t ) override { }
- bool getHasCompoundAttribute() const override { return false; }
+ bool getHasStructFieldAttribute() const override { return false; }
};
MyAttributeWriter::MyAttributeWriter(MyTracer &tracer)
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
index 0527feb7ba9..d66d47927fb 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
@@ -26,10 +26,10 @@ using LidVector = LidVectorContext::LidVector;
AttributeWriter::WriteField::WriteField(AttributeVector &attribute)
: _fieldPath(),
_attribute(attribute),
- _compoundAttribute(false)
+ _structFieldAttribute(false)
{
const vespalib::string &name = attribute.getName();
- _compoundAttribute = name.find('.') != vespalib::string::npos;
+ _structFieldAttribute = name.find('.') != vespalib::string::npos;
}
AttributeWriter::WriteField::~WriteField() = default;
@@ -50,7 +50,7 @@ AttributeWriter::WriteField::buildFieldPath(const DocumentType &docType)
AttributeWriter::WriteContext::WriteContext(uint32_t executorId)
: _executorId(executorId),
_fields(),
- _hasCompoundAttribute(false)
+ _hasStructFieldAttribute(false)
{
}
@@ -65,8 +65,8 @@ void
AttributeWriter::WriteContext::add(AttributeVector &attr)
{
_fields.emplace_back(attr);
- if (_fields.back().getCompoundAttribute()) {
- _hasCompoundAttribute = true;
+ if (_fields.back().getStructFieldAttribute()) {
+ _hasStructFieldAttribute = true;
}
}
@@ -238,7 +238,7 @@ PutTask::PutTask(const AttributeWriter::WriteContext &wc, SerialNum serialNum, s
const auto &fields = _wc.getFields();
_fieldValues.reserve(fields.size());
for (const auto &field : fields) {
- if (_allAttributes || field.getCompoundAttribute()) {
+ if (_allAttributes || field.getStructFieldAttribute()) {
FieldValue::UP fv = _fieldExtractor->getFieldValue(field.getFieldPath());
_fieldValues.emplace_back(std::move(fv));
}
@@ -255,7 +255,7 @@ PutTask::run()
uint32_t fieldId = 0;
const auto &fields = _wc.getFields();
for (auto field : fields) {
- if (_allAttributes || field.getCompoundAttribute()) {
+ if (_allAttributes || field.getStructFieldAttribute()) {
AttributeVector &attr = field.getAttribute();
if (attr.getStatus().getLastSyncToken() < _serialNum) {
applyPutToAttribute(_serialNum, _fieldValues[fieldId], _lid, _immediateCommit, attr, _onWriteDone);
@@ -393,8 +393,8 @@ AttributeWriter::setupWriteContexts()
_writeContexts.back().add(*fc.getAttribute());
}
for (const auto &wc : _writeContexts) {
- if (wc.getHasCompoundAttribute()) {
- _hasCompoundAttribute = true;
+ if (wc.getHasStructFieldAttribute()) {
+ _hasStructFieldAttribute = true;
}
}
}
@@ -418,7 +418,7 @@ AttributeWriter::internalPut(SerialNum serialNum, const Document &doc, DocumentI
}
auto extractor = std::make_shared<DocumentFieldExtractor>(doc);
for (const auto &wc : _writeContexts) {
- if (allAttributes || wc.getHasCompoundAttribute()) {
+ if (allAttributes || wc.getHasStructFieldAttribute()) {
auto putTask = std::make_unique<PutTask>(wc, serialNum, extractor, lid, immediateCommit, allAttributes, onWriteDone);
_attributeFieldWriter.executeTask(wc.getExecutorId(), std::move(putTask));
}
@@ -442,7 +442,7 @@ AttributeWriter::AttributeWriter(const proton::IAttributeManager::SP &mgr)
_writableAttributes(mgr->getWritableAttributes()),
_writeContexts(),
_dataType(nullptr),
- _hasCompoundAttribute(false)
+ _hasStructFieldAttribute(false)
{
setupWriteContexts();
}
@@ -593,9 +593,9 @@ AttributeWriter::compactLidSpace(uint32_t wantedLidLimit, SerialNum serialNum)
}
bool
-AttributeWriter::getHasCompoundAttribute() const
+AttributeWriter::getHasStructFieldAttribute() const
{
- return _hasCompoundAttribute;
+ return _hasStructFieldAttribute;
}
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.h b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.h
index dfdafa3bea9..eccbbdbfc71 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.h
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.h
@@ -27,20 +27,20 @@ public:
{
FieldPath _fieldPath;
AttributeVector &_attribute;
- bool _compoundAttribute; // in array/map of struct
+ bool _structFieldAttribute; // in array/map of struct
public:
WriteField(AttributeVector &attribute);
~WriteField();
AttributeVector &getAttribute() const { return _attribute; }
const FieldPath &getFieldPath() const { return _fieldPath; }
void buildFieldPath(const DocumentType &docType);
- bool getCompoundAttribute() const { return _compoundAttribute; }
+ bool getStructFieldAttribute() const { return _structFieldAttribute; }
};
class WriteContext
{
uint32_t _executorId;
std::vector<WriteField> _fields;
- bool _hasCompoundAttribute;
+ bool _hasStructFieldAttribute;
public:
WriteContext(uint32_t executorId);
WriteContext(WriteContext &&rhs);
@@ -50,12 +50,12 @@ public:
void add(AttributeVector &attr);
uint32_t getExecutorId() const { return _executorId; }
const std::vector<WriteField> &getFields() const { return _fields; }
- bool getHasCompoundAttribute() const { return _hasCompoundAttribute; }
+ bool getHasStructFieldAttribute() const { return _hasStructFieldAttribute; }
};
private:
std::vector<WriteContext> _writeContexts;
const DataType *_dataType;
- bool _hasCompoundAttribute;
+ bool _hasStructFieldAttribute;
void setupWriteContexts();
void buildFieldPaths(const DocumentType &docType, const DataType *dataType);
@@ -93,7 +93,7 @@ public:
void forceCommit(SerialNum serialNum, OnWriteDoneType onWriteDone) override;
void onReplayDone(uint32_t docIdLimit) override;
- bool getHasCompoundAttribute() const override;
+ bool getHasStructFieldAttribute() const override;
};
} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/i_attribute_writer.h b/searchcore/src/vespa/searchcore/proton/attribute/i_attribute_writer.h
index 7a557b17964..df6f9d50e36 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/i_attribute_writer.h
+++ b/searchcore/src/vespa/searchcore/proton/attribute/i_attribute_writer.h
@@ -48,7 +48,7 @@ public:
virtual void update(SerialNum serialNum, const DocumentUpdate &upd, DocumentIdT lid,
bool immediateCommit, OnWriteDoneType onWriteDone, IFieldUpdateCallback & onUpdate) = 0;
/*
- * Update the underlying compound attributes based on updated document.
+ * Update the underlying struct field attributes based on updated document.
*/
virtual void update(SerialNum serialNum, const Document &doc, DocumentIdT lid,
bool immediateCommit, OnWriteDoneType onWriteDone) = 0;
@@ -66,7 +66,7 @@ public:
virtual void onReplayDone(uint32_t docIdLimit) = 0;
- virtual bool getHasCompoundAttribute() const = 0;
+ virtual bool getHasStructFieldAttribute() const = 0;
};
} // namespace proton
diff --git a/searchcore/src/vespa/searchcore/proton/server/fast_access_feed_view.cpp b/searchcore/src/vespa/searchcore/proton/server/fast_access_feed_view.cpp
index 78733b14aaa..ab4b06080c2 100644
--- a/searchcore/src/vespa/searchcore/proton/server/fast_access_feed_view.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/fast_access_feed_view.cpp
@@ -39,7 +39,7 @@ void
FastAccessFeedView::updateAttributes(SerialNum serialNum, Lid lid, FutureDoc doc,
bool immediateCommit, OnOperationDoneType onWriteDone)
{
- if (_attributeWriter->getHasCompoundAttribute()) {
+ if (_attributeWriter->getHasStructFieldAttribute()) {
_attributeWriter->update(serialNum, *doc.get(), lid, immediateCommit, onWriteDone);
}
}