summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorGeir Storli <geirst@oath.com>2017-09-05 14:30:47 +0000
committerGeir Storli <geirst@oath.com>2017-09-06 15:45:25 +0000
commit2b98bb212c745205d37666b3fdb9ad18243cb8fd (patch)
treec0551ed78c00a65a75fa24c2627efb84065a4111 /searchcore
parente65e07a491c8ac14d2a951158b9d446339b1ad49 (diff)
Rename IAttributeWriter::commit() -> forceCommit().
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_test.cpp8
-rw-r--r--searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/i_attribute_writer.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/fast_access_feed_view.cpp2
7 files changed, 10 insertions, 11 deletions
diff --git a/searchcore/src/tests/proton/attribute/attribute_test.cpp b/searchcore/src/tests/proton/attribute/attribute_test.cpp
index e6052c02ee6..ad80f99a6aa 100644
--- a/searchcore/src/tests/proton/attribute/attribute_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attribute_test.cpp
@@ -152,7 +152,7 @@ struct Fixture
_aw->remove(serialNum, lid, immediateCommit, emptyCallback);
}
void commit(SerialNum serialNum) {
- _aw->commit(serialNum, emptyCallback);
+ _aw->forceCommit(serialNum, emptyCallback);
}
void assertExecuteHistory(std::vector<uint32_t> expExecuteHistory) {
EXPECT_EQUAL(expExecuteHistory, _attributeFieldWriter.getExecuteHistory());
@@ -345,14 +345,14 @@ TEST_F("require that visibilitydelay is honoured", Fixture)
awDelayed.put(5, *doc, 4, false, emptyCallback);
EXPECT_EQUAL(5u, a1->getNumDocs());
EXPECT_EQUAL(3u, a1->getStatus().getLastSyncToken());
- awDelayed.commit(6, emptyCallback);
+ awDelayed.forceCommit(6, emptyCallback);
EXPECT_EQUAL(6u, a1->getStatus().getLastSyncToken());
AttributeWriter awDelayedShort(f._m);
awDelayedShort.put(7, *doc, 2, false, emptyCallback);
EXPECT_EQUAL(6u, a1->getStatus().getLastSyncToken());
awDelayedShort.put(8, *doc, 2, false, emptyCallback);
- awDelayedShort.commit(8, emptyCallback);
+ awDelayedShort.forceCommit(8, emptyCallback);
EXPECT_EQUAL(8u, a1->getStatus().getLastSyncToken());
verifyAttributeContent(*a1, 2, "10");
@@ -364,7 +364,7 @@ TEST_F("require that visibilitydelay is honoured", Fixture)
2, false, emptyCallback);
EXPECT_EQUAL(8u, a1->getStatus().getLastSyncToken());
verifyAttributeContent(*a1, 2, "10");
- awDelayed.commit(12, emptyCallback);
+ awDelayed.forceCommit(12, emptyCallback);
EXPECT_EQUAL(12u, a1->getStatus().getLastSyncToken());
verifyAttributeContent(*a1, 2, "30");
diff --git a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
index 8af365d6327..c02aa033bb9 100644
--- a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
@@ -385,7 +385,7 @@ struct MyAttributeWriter : public IAttributeWriter
virtual const proton::IAttributeManager::SP &getAttributeManager() const override {
return _mgr;
}
- void commit(SerialNum serialNum, OnWriteDoneType) override {
+ void forceCommit(SerialNum serialNum, OnWriteDoneType) override {
(void) serialNum; ++_commitCount;
_tracer.traceCommit(attributeAdapterTypeName, serialNum);
}
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
index 6d4915d800d..98ad981917d 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
@@ -459,7 +459,7 @@ AttributeWriter::heartBeat(SerialNum serialNum)
void
-AttributeWriter::commit(SerialNum serialNum, OnWriteDoneType onWriteDone)
+AttributeWriter::forceCommit(SerialNum serialNum, OnWriteDoneType onWriteDone)
{
for (const auto &wc : _writeContexts) {
auto commitTask = std::make_unique<CommitTask>(wc, serialNum, onWriteDone);
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.h b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.h
index 58b92459358..cbda11180c0 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.h
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.h
@@ -74,7 +74,7 @@ public:
const proton::IAttributeManager::SP &getAttributeManager() const override {
return _mgr;
}
- void commit(SerialNum serialNum, OnWriteDoneType onWriteDone) override;
+ void forceCommit(SerialNum serialNum, OnWriteDoneType onWriteDone) override;
virtual void onReplayDone(uint32_t docIdLimit) override;
};
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 5903b4d76e4..7455ccda5a3 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/i_attribute_writer.h
+++ b/searchcore/src/vespa/searchcore/proton/attribute/i_attribute_writer.h
@@ -61,7 +61,7 @@ public:
/**
* Commit all underlying attribute vectors with the given serial number.
*/
- virtual void commit(SerialNum serialNum, OnWriteDoneType onWriteDone) = 0;
+ virtual void forceCommit(SerialNum serialNum, OnWriteDoneType onWriteDone) = 0;
virtual void onReplayDone(uint32_t docIdLimit) = 0;
};
diff --git a/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp b/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp
index 8f2e6081b95..692bb12213e 100644
--- a/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp
@@ -328,8 +328,7 @@ FastAccessDocSubDB::onReprocessDone(SerialNum serialNum)
IFeedView::SP feedView = _iFeedView.get();
IAttributeWriter::SP attrWriter =
static_cast<FastAccessFeedView &>(*feedView).getAttributeWriter();
- attrWriter->commit(serialNum,
- std::shared_ptr<search::IDestructorCallback>());
+ attrWriter->forceCommit(serialNum, std::shared_ptr<search::IDestructorCallback>());
_writeService.attributeFieldWriter().sync();
_writeService.summary().sync();
Parent::onReprocessDone(serialNum);
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 a48c6373c00..2444223c96f 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
@@ -106,7 +106,7 @@ void
FastAccessFeedView::forceCommit(SerialNum serialNum,
OnForceCommitDoneType onCommitDone)
{
- _attributeWriter->commit(serialNum, onCommitDone);
+ _attributeWriter->forceCommit(serialNum, onCommitDone);
onCommitDone->registerCommittedDocIdLimit(_metaStore.getCommittedDocIdLimit(), &_docIdLimit);
Parent::forceCommit(serialNum, onCommitDone);
}