diff options
Diffstat (limited to 'searchcorespi/src')
-rw-r--r-- | searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.cpp | 12 | ||||
-rw-r--r-- | searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.cpp b/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.cpp index fab0c603189..a49518a6d50 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.cpp +++ b/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.cpp @@ -81,7 +81,7 @@ WarmupIndexCollection::toString() const WarmupIndexCollection::~WarmupIndexCollection() { - if (_warmupEndTime != 0) { + if (_warmupEndTime != fastos::SteadyTimeStamp::ZERO) { LOG(info, "Warmup aborted due to new state change or application shutdown"); } _executor.sync(); @@ -114,13 +114,13 @@ WarmupIndexCollection::getSourceId(uint32_t i) const void WarmupIndexCollection::fireWarmup(Task::UP task) { - fastos::TimeStamp now(fastos::ClockSteady::now()); + fastos::SteadyTimeStamp now(fastos::ClockSteady::now()); if (now < _warmupEndTime) { _executor.execute(std::move(task)); } else { std::unique_lock<std::mutex> guard(_lock); - if (_warmupEndTime != 0) { - _warmupEndTime = 0; + if (_warmupEndTime != fastos::SteadyTimeStamp::ZERO) { + _warmupEndTime = fastos::SteadyTimeStamp::ZERO; guard.unlock(); LOG(info, "Done warming up. Posting WarmupDoneTask"); _warmupDone.warmupDone(shared_from_this()); @@ -155,7 +155,7 @@ WarmupIndexCollection::createBlueprint(const IRequestContext & requestContext, const FieldSpecList &fields, const Node &term) { - if ( _warmupEndTime == 0) { + if ( _warmupEndTime == fastos::SteadyTimeStamp::ZERO) { // warmup done return _next->createBlueprint(requestContext, fields, term); } @@ -224,7 +224,7 @@ WarmupIndexCollection::getSearchableSP(uint32_t i) const void WarmupIndexCollection::WarmupTask::run() { - if (_warmup._warmupEndTime != 0) { + if (_warmup._warmupEndTime != fastos::SteadyTimeStamp::ZERO) { LOG(debug, "Warming up %s", _bluePrint->asString().c_str()); _bluePrint->fetchPostings(true); SearchIterator::UP it(_bluePrint->createSearch(*_matchData, true)); diff --git a/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.h b/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.h index 992cedb1057..c13a0257019 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.h +++ b/searchcorespi/src/vespa/searchcorespi/index/warmupindexcollection.h @@ -101,7 +101,7 @@ private: IndexSearchable & _warmup; vespalib::SyncableThreadExecutor & _executor; IWarmupDone & _warmupDone; - fastos::TimeStamp _warmupEndTime; + fastos::SteadyTimeStamp _warmupEndTime; std::mutex _lock; std::unique_ptr<FieldTermMap> _handledTerms; }; |