aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/tests/features/tensor/tensor_test.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/docstore/logdatastore.cpp19
-rw-r--r--searchlib/src/vespa/searchlib/tensor/direct_tensor_attribute.h2
-rw-r--r--searchlib/src/vespa/searchlib/transactionlog/trans_log_server_explorer.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/util/filekit.cpp2
5 files changed, 14 insertions, 13 deletions
diff --git a/searchlib/src/tests/features/tensor/tensor_test.cpp b/searchlib/src/tests/features/tensor/tensor_test.cpp
index 54807273aea..5ad30c61c37 100644
--- a/searchlib/src/tests/features/tensor/tensor_test.cpp
+++ b/searchlib/src/tests/features/tensor/tensor_test.cpp
@@ -121,7 +121,7 @@ struct ExecFixture
.add({{"x", "b"}}, 5)
.add({{"x", "c"}}, 7));
tensorAttr->setTensor(1, *doc_tensor);
- directAttr->set_tensor(1, std::move(doc_tensor));
+ directAttr->setTensor(1, *doc_tensor);
for (const auto &attr : attrs) {
attr->commit();
diff --git a/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp b/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
index 174b6b92cd5..e76caba55a1 100644
--- a/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
+++ b/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
@@ -35,6 +35,7 @@ using vespalib::IllegalStateException;
using vespalib::getErrorString;
using vespalib::getLastErrorString;
using vespalib::make_string;
+using vespalib::to_string;
using CpuCategory = CpuUsage::Category;
@@ -665,7 +666,7 @@ lsSingleFile(const vespalib::string & fileName)
vespalib::string s;
FastOS_StatInfo stat;
if ( FastOS_File::Stat(fileName.c_str(), &stat)) {
- s += make_string("%s %20" PRIu64 " %12" PRId64, fileName.c_str(), stat._modifiedTimeNS, stat._size);
+ s += make_string("%s %20" PRIu64 " %12" PRId64, fileName.c_str(), vespalib::count_ns(stat._modifiedTime.time_since_epoch()), stat._size);
} else {
s = make_string("%s 'stat' FAILED !!", fileName.c_str());
}
@@ -744,16 +745,16 @@ LogDataStore::verifyModificationTime(const NameIdSet & partList)
throw runtime_error(make_string("Failed to Stat '%s'\nDirectory =\n%s", idxName.c_str(), ls(partList).c_str()));
}
ns_log::Logger::LogLevel logLevel = ns_log::Logger::debug;
- if ((datStat._modifiedTimeNS < prevDatStat._modifiedTimeNS) && hasNonHeaderData(datName)) {
- VLOG(logLevel, "Older file '%s' is newer (%" PRIu64 ") than file '%s' (%" PRIu64 ")\nDirectory =\n%s",
- prevDatNam.c_str(), prevDatStat._modifiedTimeNS,
- datName.c_str(), datStat._modifiedTimeNS,
+ if ((datStat._modifiedTime < prevDatStat._modifiedTime) && hasNonHeaderData(datName)) {
+ VLOG(logLevel, "Older file '%s' is newer (%s) than file '%s' (%s)\nDirectory =\n%s",
+ prevDatNam.c_str(), to_string(prevDatStat._modifiedTime).c_str(),
+ datName.c_str(), to_string(datStat._modifiedTime).c_str(),
ls(partList).c_str());
}
- if ((idxStat._modifiedTimeNS < prevIdxStat._modifiedTimeNS) && hasNonHeaderData(idxName)) {
- VLOG(logLevel, "Older file '%s' is newer (%" PRIu64 ") than file '%s' (%" PRIu64 ")\nDirectory =\n%s",
- prevIdxNam.c_str(), prevIdxStat._modifiedTimeNS,
- idxName.c_str(), idxStat._modifiedTimeNS,
+ if ((idxStat._modifiedTime < prevIdxStat._modifiedTime) && hasNonHeaderData(idxName)) {
+ VLOG(logLevel, "Older file '%s' is newer (%s) than file '%s' (%s)\nDirectory =\n%s",
+ prevIdxNam.c_str(), to_string(prevIdxStat._modifiedTime).c_str(),
+ idxName.c_str(), to_string(idxStat._modifiedTime).c_str(),
ls(partList).c_str());
}
prevDatStat = datStat;
diff --git a/searchlib/src/vespa/searchlib/tensor/direct_tensor_attribute.h b/searchlib/src/vespa/searchlib/tensor/direct_tensor_attribute.h
index d331cdca440..73bd929aee6 100644
--- a/searchlib/src/vespa/searchlib/tensor/direct_tensor_attribute.h
+++ b/searchlib/src/vespa/searchlib/tensor/direct_tensor_attribute.h
@@ -14,6 +14,7 @@ class DirectTensorAttribute final : public TensorAttribute
{
DirectTensorStore _direct_store;
+ void set_tensor(DocId docId, std::unique_ptr<vespalib::eval::Value> tensor);
public:
DirectTensorAttribute(vespalib::stringref baseFileName, const Config &cfg, const NearestNeighborIndexFactory& index_factory = DefaultNearestNeighborIndexFactory());
~DirectTensorAttribute() override;
@@ -21,7 +22,6 @@ public:
void update_tensor(DocId docId,
const document::TensorUpdate &update,
bool create_empty_if_non_existing) override;
- void set_tensor(DocId docId, std::unique_ptr<vespalib::eval::Value> tensor);
const vespalib::eval::Value &get_tensor_ref(DocId docId) const override;
bool supports_get_tensor_ref() const override { return true; }
diff --git a/searchlib/src/vespa/searchlib/transactionlog/trans_log_server_explorer.cpp b/searchlib/src/vespa/searchlib/transactionlog/trans_log_server_explorer.cpp
index 103438d6d61..f49cef72172 100644
--- a/searchlib/src/vespa/searchlib/transactionlog/trans_log_server_explorer.cpp
+++ b/searchlib/src/vespa/searchlib/transactionlog/trans_log_server_explorer.cpp
@@ -37,7 +37,7 @@ struct DomainExplorer : vespalib::StateExplorer {
{
FastOS_StatInfo stat_info;
FastOS_File::Stat(part_in.file.c_str(), &stat_info);
- part.setString("lastModified", vespalib::to_string(vespalib::system_time(std::chrono::duration_cast<vespalib::system_time::duration>(std::chrono::nanoseconds(stat_info._modifiedTimeNS)))));
+ part.setString("lastModified", vespalib::to_string(stat_info._modifiedTime));
}
}
}
diff --git a/searchlib/src/vespa/searchlib/util/filekit.cpp b/searchlib/src/vespa/searchlib/util/filekit.cpp
index 68557159635..07eab9bb2be 100644
--- a/searchlib/src/vespa/searchlib/util/filekit.cpp
+++ b/searchlib/src/vespa/searchlib/util/filekit.cpp
@@ -95,7 +95,7 @@ FileKit::getModificationTime(const vespalib::string &name)
{
FastOS_StatInfo statInfo;
if (FastOS_File::Stat(name.c_str(), &statInfo)) {
- return vespalib::system_time(std::chrono::duration_cast<vespalib::system_time::duration>(std::chrono::nanoseconds(statInfo._modifiedTimeNS)));
+ return statInfo._modifiedTime;
}
return vespalib::system_time();
}