aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fastos/src/vespa/fastos/timestamp.h2
-rw-r--r--searchcore/src/tests/proton/attribute/attributeflush_test.cpp10
-rw-r--r--searchcore/src/tests/proton/index/indexmanager_test.cpp10
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/flushableattribute.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/memoryflush.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/pruneremoveddocumentsjob.cpp2
-rw-r--r--searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp2
-rw-r--r--searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/docstore/logdatastore.cpp2
10 files changed, 20 insertions, 20 deletions
diff --git a/fastos/src/vespa/fastos/timestamp.h b/fastos/src/vespa/fastos/timestamp.h
index 79d6ef5eed6..3814a099e46 100644
--- a/fastos/src/vespa/fastos/timestamp.h
+++ b/fastos/src/vespa/fastos/timestamp.h
@@ -92,7 +92,7 @@ public:
friend bool operator >= (UTCTimeStamp a, UTCTimeStamp b) {
return a._timeStamp >= b._timeStamp;
}
- TimeStamp timeSinceEpoch() const { return _timeStamp - ZERO._timeStamp; }
+ TimeStamp time_since_epoch() const { return _timeStamp - ZERO._timeStamp; }
std::string toString() const { return _timeStamp.toString(); };
private:
TimeStamp _timeStamp;
diff --git a/searchcore/src/tests/proton/attribute/attributeflush_test.cpp b/searchcore/src/tests/proton/attribute/attributeflush_test.cpp
index c41ac3a3a1c..ea3d2c335fb 100644
--- a/searchcore/src/tests/proton/attribute/attributeflush_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attributeflush_test.cpp
@@ -516,21 +516,21 @@ Test::requireThatLastFlushTimeIsReported()
EXPECT_EQUAL(fastos::UTCTimeStamp::ZERO, ft->getLastFlushTime());
ft->initFlush(200)->run();
EXPECT_TRUE(FastOS_File::Stat("flush/a9/snapshot-200", &stat));
- EXPECT_EQUAL(stat._modifiedTime, ft->getLastFlushTime().timeSinceEpoch().time());
+ EXPECT_EQUAL(stat._modifiedTime, ft->getLastFlushTime().time_since_epoch().time());
}
{ // snapshot flushed
AttributeManagerFixture amf(f);
AttributeManager &am = amf._m;
amf.addAttribute("a9");
IFlushTarget::SP ft = am.getFlushable("a9");
- EXPECT_EQUAL(stat._modifiedTime, ft->getLastFlushTime().timeSinceEpoch().time());
+ EXPECT_EQUAL(stat._modifiedTime, ft->getLastFlushTime().time_since_epoch().time());
{ // updated flush time after nothing to flush
std::this_thread::sleep_for(8000ms);
- fastos::TimeStamp now = fastos::ClockSystem::now().timeSinceEpoch();
+ fastos::TimeStamp now = fastos::ClockSystem::now().time_since_epoch();
Executor::Task::UP task = ft->initFlush(200);
EXPECT_TRUE(task.get() == NULL);
- EXPECT_LESS(stat._modifiedTime, ft->getLastFlushTime().timeSinceEpoch().time());
- EXPECT_APPROX(now.time(), ft->getLastFlushTime().timeSinceEpoch().time(), 8);
+ EXPECT_LESS(stat._modifiedTime, ft->getLastFlushTime().time_since_epoch().time());
+ EXPECT_APPROX(now.time(), ft->getLastFlushTime().time_since_epoch().time(), 8);
}
}
}
diff --git a/searchcore/src/tests/proton/index/indexmanager_test.cpp b/searchcore/src/tests/proton/index/indexmanager_test.cpp
index 51e12e70dda..1941e82a2db 100644
--- a/searchcore/src/tests/proton/index/indexmanager_test.cpp
+++ b/searchcore/src/tests/proton/index/indexmanager_test.cpp
@@ -280,7 +280,7 @@ TEST_F(IndexManagerTest, require_that_memory_index_is_flushed)
runAsMaster([&]() { flushTask = target.initFlush(1); });
flushTask->run();
EXPECT_TRUE(FastOS_File::Stat("test_data/index.flush.1", &stat));
- EXPECT_EQ(stat._modifiedTime, target.getLastFlushTime().timeSinceEpoch().time());
+ EXPECT_EQ(stat._modifiedTime, target.getLastFlushTime().time_since_epoch().time());
sources = get_source_collection();
EXPECT_EQ(2u, sources->getSourceCount());
@@ -298,17 +298,17 @@ TEST_F(IndexManagerTest, require_that_memory_index_is_flushed)
{ // verify last flush time when loading disk index
resetIndexManager();
IndexFlushTarget target(_index_manager->getMaintainer());
- EXPECT_EQ(stat._modifiedTime, target.getLastFlushTime().timeSinceEpoch().time());
+ EXPECT_EQ(stat._modifiedTime, target.getLastFlushTime().time_since_epoch().time());
// updated serial number & flush time when nothing to flush
std::this_thread::sleep_for(8s);
- fastos::TimeStamp now = fastos::ClockSystem::now().timeSinceEpoch();
+ fastos::TimeStamp now = fastos::ClockSystem::now().time_since_epoch();
vespalib::Executor::Task::UP task;
runAsMaster([&]() { task = target.initFlush(2); });
EXPECT_TRUE(task.get() == nullptr);
EXPECT_EQ(2u, target.getFlushedSerialNum());
- EXPECT_LT(stat._modifiedTime, target.getLastFlushTime().timeSinceEpoch().time());
- EXPECT_NEAR(now.time(), target.getLastFlushTime().timeSinceEpoch().time(), 8);
+ EXPECT_LT(stat._modifiedTime, target.getLastFlushTime().time_since_epoch().time());
+ EXPECT_NEAR(now.time(), target.getLastFlushTime().time_since_epoch().time(), 8);
}
}
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/flushableattribute.cpp b/searchcore/src/vespa/searchcore/proton/attribute/flushableattribute.cpp
index 66d1c27a5b5..0e0e96aa871 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/flushableattribute.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/flushableattribute.cpp
@@ -211,7 +211,7 @@ FlushableAttribute::internalInitFlush(SerialNum currentSerial)
if (syncToken <= getFlushedSerialNum()) {
writer->setLastFlushTime(fastos::ClockSystem::now());
LOG(debug,"No attribute vector to flush. Update flush time to current: lastFlushTime(%f)",
- getLastFlushTime().timeSinceEpoch().sec());
+ getLastFlushTime().time_since_epoch().sec());
return Task::UP();
}
return std::make_unique<Flusher>(*this, syncToken, *writer);
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.cpp
index 2cadedd0f59..71274bf444e 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastoreflushtarget.cpp
@@ -223,7 +223,7 @@ DocumentMetaStoreFlushTarget::initFlush(SerialNum currentSerial)
if (syncToken <= getFlushedSerialNum()) {
writer->setLastFlushTime(fastos::ClockSystem::now());
LOG(debug, "No document meta store to flush. Update flush time to current: lastFlushTime(%f)",
- getLastFlushTime().timeSinceEpoch().sec());
+ getLastFlushTime().time_since_epoch().sec());
return Task::UP();
}
return std::make_unique<Flusher>(*this, syncToken, *writer);
diff --git a/searchcore/src/vespa/searchcore/proton/server/memoryflush.cpp b/searchcore/src/vespa/searchcore/proton/server/memoryflush.cpp
index 8ea9e095385..86e818e0fe3 100644
--- a/searchcore/src/vespa/searchcore/proton/server/memoryflush.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/memoryflush.cpp
@@ -140,7 +140,7 @@ MemoryFlush::getFlushTargets(const FlushContext::List &targetList,
config.maxGlobalMemory, config.maxGlobalTlsSize, config.globalDiskBloatFactor,
config.maxMemoryGain, config.diskBloatFactor,
config.maxTimeGain.sec(),
- _startTime.timeSinceEpoch().sec());
+ _startTime.time_since_epoch().sec());
for (size_t i(0), m(targetList.size()); i < m; i++) {
const IFlushTarget & target(*targetList[i]->getTarget());
const IFlushHandler & handler(*targetList[i]->getHandler());
@@ -183,8 +183,8 @@ MemoryFlush::getFlushTargets(const FlushContext::List &targetList,
target.getFlushedSerialNum(),
localLastSerial,
serialDiff,
- lastFlushTime.timeSinceEpoch().sec(),
- now.timeSinceEpoch().sec(),
+ lastFlushTime.time_since_epoch().sec(),
+ now.time_since_epoch().sec(),
timeDiff.sec(),
getOrderName(order).c_str());
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/pruneremoveddocumentsjob.cpp b/searchcore/src/vespa/searchcore/proton/server/pruneremoveddocumentsjob.cpp
index b5a430b3bcb..8bf96b4d370 100644
--- a/searchcore/src/vespa/searchcore/proton/server/pruneremoveddocumentsjob.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/pruneremoveddocumentsjob.cpp
@@ -67,7 +67,7 @@ PruneRemovedDocumentsJob::run()
uint64_t tshz = 1000000;
fastos::UTCTimeStamp now = fastos::ClockSystem::now();
const Timestamp ageLimit(static_cast<Timestamp::Type>
- ((now.timeSinceEpoch().sec() - _cfgAgeLimit) * tshz));
+ ((now.time_since_epoch().sec() - _cfgAgeLimit) * tshz));
DocId lid(_nextLid);
const DocId olid(lid);
const DocId docIdLimit(_metaStore.getCommittedDocIdLimit());
diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp
index da3058e9bbd..e2ab5f5ff1f 100644
--- a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp
+++ b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp
@@ -944,7 +944,7 @@ IndexMaintainer::initFlush(SerialNum serialNum, searchcorespi::FlushStats * stat
_lastFlushTime = fastos::ClockSystem::now();
LOG(debug, "No memory index to flush. Update serial number and flush time to current: "
"flushSerialNum(%" PRIu64 "), lastFlushTime(%f)",
- _flush_serial_num, _lastFlushTime.timeSinceEpoch().sec());
+ _flush_serial_num, _lastFlushTime.time_since_epoch().sec());
return FlushTask::UP();
}
SerialNum realSerialNum = args.flush_serial_num;
diff --git a/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp b/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp
index 4e2450dccc9..9ec5cc8857b 100644
--- a/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp
+++ b/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp
@@ -764,7 +764,7 @@ TEST("requireThatFlushTimeIsAvailableAfterFlush") {
MyTlSyncer tlSyncer;
LogDataStore store(executor, testDir.getDir(), config, GrowStrategy(),
TuneFileSummary(), fileHeaderContext, tlSyncer, nullptr);
- EXPECT_EQUAL(0, store.getLastFlushTime().timeSinceEpoch().time());
+ EXPECT_EQUAL(0, store.getLastFlushTime().time_since_epoch().time());
uint64_t flushToken = store.initFlush(5);
EXPECT_EQUAL(5u, flushToken);
store.flush(flushToken);
diff --git a/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp b/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
index 19b945ddd9c..95c02e57dd1 100644
--- a/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
+++ b/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
@@ -656,7 +656,7 @@ LogDataStore::createWritableFile(FileId fileId, SerialNum serialNum, NameId name
FileChunk::UP
LogDataStore::createWritableFile(FileId fileId, SerialNum serialNum)
{
- return createWritableFile(fileId, serialNum, NameId(fastos::ClockSystem::now().timeSinceEpoch()));
+ return createWritableFile(fileId, serialNum, NameId(fastos::ClockSystem::now().time_since_epoch()));
}
namespace {