summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2019-03-12 22:22:56 +0100
committerTor Egge <Tor.Egge@broadpark.no>2019-03-12 22:22:56 +0100
commita97d276a14f30fba24fa9dbffcc508f3be0ddabd (patch)
tree21c8e6361f00a9a40c78ef0df51eb170995817fc /searchcore
parentd8ecba43c97b03cd84497ac9d6cd8a803540ed16 (diff)
Fix format strings in searchcore module.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/search/fnet_dataset.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attributemanager.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/flushengine/flushengine.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/matcher.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdb.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/memory_flush_config_updater.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/memoryflush.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/summaryadapter.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/transactionlogmanager.cpp10
16 files changed, 30 insertions, 30 deletions
diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/fnet_dataset.cpp b/searchcore/src/vespa/searchcore/fdispatch/search/fnet_dataset.cpp
index c80cb32de65..081d5e7da34 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/search/fnet_dataset.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/search/fnet_dataset.cpp
@@ -118,7 +118,7 @@ FastS_FNET_DataSet::isGoodRow(uint32_t rowId)
isBad = true;
if (!wasBad) {
_failedRowsBitmask |= rowBit;
- LOG(warning, "Not enough active docs in group %d (only %lu docs, average is %g)",
+ LOG(warning, "Not enough active docs in group %d (only %" PRIu64 " docs, average is %g)",
rowId, candDocs, restAvg);
}
}
@@ -137,7 +137,7 @@ FastS_FNET_DataSet::isGoodRow(uint32_t rowId)
}
if (wasBad && !isBad) {
_failedRowsBitmask &= ~rowBit;
- LOG(info, "Group %d is now good again (%lu/%g active docs, coverage %ld/%ld)",
+ LOG(info, "Group %d is now good again (%" PRIu64 "/%g active docs, coverage %ld/%ld)",
rowId, candDocs, restAvg, nodesUp, configuredParts);
}
return !isBad;
diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.cpp b/searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.cpp
index ddbf3fe94c4..f665e25f819 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.cpp
@@ -282,7 +282,7 @@ FastS_FNET_Search::getNextFixedRow()
if (numTries == maxTries) {
fixedRow = getFixedRowCandidate(); // Will roundrobin/random if all rows are incomplete.
}
- LOG(debug, "FixedRow: selected=%d, numRows=%d, numTries=%ld, _G_prevFixedRow=%ld", fixedRow, _dataset->getNumRows(), numTries, _G_prevFixedRow.load());
+ LOG(debug, "FixedRow: selected=%d, numRows=%d, numTries=%ld, _G_prevFixedRow=%" PRIu64, fixedRow, _dataset->getNumRows(), numTries, _G_prevFixedRow.load());
return fixedRow;
}
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attributemanager.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attributemanager.cpp
index be4be9392c5..e39061a8389 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attributemanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attributemanager.cpp
@@ -182,7 +182,7 @@ AttributeManager::transferExistingAttributes(const AttributeManager &currMgr,
for (const auto &aspec : newSpec.getAttributes()) {
AttributeVector::SP av = currMgr.findAttribute(aspec.getName());
if (matchingTypes(av, aspec.getConfig())) { // transfer attribute
- LOG(debug, "Transferring attribute vector '%s' with %u docs and serial number %lu from current manager",
+ LOG(debug, "Transferring attribute vector '%s' with %u docs and serial number %" PRIu64 " from current manager",
av->getName().c_str(), av->getNumDocs(), av->getStatus().getLastSyncToken());
auto wrap = currMgr.findFlushable(aspec.getName());
assert(wrap != nullptr);
@@ -201,7 +201,7 @@ AttributeManager::addNewAttributes(const Spec &newSpec,
IAttributeInitializerRegistry &initializerRegistry)
{
for (const auto &aspec : toBeAdded) {
- LOG(debug, "Creating initializer for attribute vector '%s': docIdLimit=%u, serialNumber=%lu",
+ LOG(debug, "Creating initializer for attribute vector '%s': docIdLimit=%u, serialNumber=%" PRIu64,
aspec.getName().c_str(), newSpec.getDocIdLimit(), newSpec.getCurrentSerialNum());
AttributeInitializer::UP initializer =
diff --git a/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.cpp b/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.cpp
index a9d599c316d..edb91787214 100644
--- a/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.cpp
+++ b/searchcore/src/vespa/searchcore/proton/docsummary/docsumcontext.cpp
@@ -78,7 +78,7 @@ DocsumContext::createReply()
Slime slime(Slime::Params(std::move(symbols)));
vespalib::slime::SlimeInserter inserter(slime);
if (_request.expired()) {
- inserter.insertString(make_string("Timed out with %ldus left.", _request.getTimeLeft().us()));
+ inserter.insertString(make_string("Timed out with %" PRId64 "us left.", _request.getTimeLeft().us()));
} else {
_docsumWriter.insertDocsum(rci, docId, &_docsumState, &_docsumStore, slime, inserter);
}
@@ -128,7 +128,7 @@ DocsumContext::createSlimeReply()
Cursor & errors = root.setArray(ERRORS);
Cursor & timeout = errors.addObject();
timeout.setString(TYPE, TIMEOUT);
- timeout.setString(MESSAGE, make_string("Timed out %d summaries with %ldus left.",
+ timeout.setString(MESSAGE, make_string("Timed out %d summaries with %" PRId64 "us left.",
numTimedOut, _request.getTimeLeft().us()));
}
return response;
diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/flushengine.cpp b/searchcore/src/vespa/searchcore/proton/flushengine/flushengine.cpp
index ed56599b6fe..44406e2227a 100644
--- a/searchcore/src/vespa/searchcore/proton/flushengine/flushengine.cpp
+++ b/searchcore/src/vespa/searchcore/proton/flushengine/flushengine.cpp
@@ -234,15 +234,15 @@ FlushEngine::getTargetList(bool includeFlushingTargets) const
for (const auto & it : _handlers) {
IFlushHandler & handler(*it.second);
search::SerialNum serial(handler.getCurrentSerialNumber());
- LOG(spam, "Checking FlushHandler '%s' current serial = %ld", handler.getName().c_str(), serial);
+ LOG(spam, "Checking FlushHandler '%s' current serial = %" PRIu64, handler.getName().c_str(), serial);
IFlushTarget::List lst = handler.getFlushTargets();
for (const IFlushTarget::SP & target : lst) {
- LOG(spam, "Checking target '%s' with flushedSerialNum = %ld",
+ LOG(spam, "Checking target '%s' with flushedSerialNum = %" PRIu64,
target->getName().c_str(), target->getFlushedSerialNum());
if (!isFlushing(guard, FlushContext::createName(handler, *target)) || includeFlushingTargets) {
ret.push_back(std::make_shared<FlushContext>(it.second, std::make_shared<CachedFlushTarget>(target), serial));
} else {
- LOG(debug, "Target '%s' with flushedSerialNum = %ld already has a flush going. Local last serial = %ld.",
+ LOG(debug, "Target '%s' with flushedSerialNum = %" PRIu64 " already has a flush going. Local last serial = %" PRIu64 ".",
target->getName().c_str(), target->getFlushedSerialNum(), serial);
}
}
diff --git a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
index 1692abed011..f02bc99a645 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/matcher.cpp
@@ -174,7 +174,7 @@ Matcher::create_match_tools_factory(const search::engine::Request &request, ISea
int64_t safeLeft = request.getTimeLeft() * factor;
fastos::TimeStamp safeDoom(fastos::ClockSystem::now() + safeLeft);
if (softTimeoutEnabled) {
- LOG(debug, "Soft-timeout computed factor=%1.3f, used factor=%1.3f, softTimeout=%lu softDoom=%ld hardDoom=%ld",
+ LOG(debug, "Soft-timeout computed factor=%1.3f, used factor=%1.3f, softTimeout=%" PRId64 " softDoom=%" PRId64 " hardDoom=%" PRId64,
_stats.softDoomFactor(), factor, safeLeft, safeDoom.ns(), request.getTimeOfDoom().ns());
}
return std::make_unique<MatchToolsFactory>(_queryLimiter, vespalib::Doom(_clock, safeDoom),
@@ -316,9 +316,9 @@ Matcher::match(const SearchRequest &request, vespalib::ThreadBundle &threadBundl
}
if (my_stats.softDoomed()) {
coverage.degradeTimeout();
- LOG(debug, "soft doomed, degraded from timeout covered = %lu", coverage.getCovered());
+ LOG(debug, "soft doomed, degraded from timeout covered = %" PRIu64, coverage.getCovered());
}
- LOG(debug, "numThreadsPerSearch = %zu. Configured = %d, estimated hits=%d, totalHits=%ld , rankprofile=%s",
+ LOG(debug, "numThreadsPerSearch = %zu. Configured = %d, estimated hits=%d, totalHits=%" PRIu64 ", rankprofile=%s",
numThreadsPerSearch, _rankSetup->getNumThreadsPerSearch(), estHits, reply->totalHitCount,
request.ranking.c_str());
}
diff --git a/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp b/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp
index dc95f3ddc04..57e26f77cca 100644
--- a/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp
+++ b/searchcore/src/vespa/searchcore/proton/persistenceengine/persistenceengine.cpp
@@ -650,7 +650,7 @@ PersistenceEngine::destroyIterators()
}
Result res(destroyIterator(id, context));
if (res.hasError()) {
- LOG(debug, "%ld iterator left. Can not destroy iterator '%ld'. Reason='%s'", _iterators.size(), id.getValue(), res.toString().c_str());
+ LOG(debug, "%zu iterator left. Can not destroy iterator '%" PRIu64 "'. Reason='%s'", _iterators.size(), id.getValue(), res.toString().c_str());
std::this_thread::sleep_for(100ms);
}
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
index 352de412f79..6158dde71de 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp
@@ -1054,7 +1054,7 @@ DocumentDB::updateMetrics(DocumentDBTaggedMetrics &metrics)
void
DocumentDB::sync(SerialNum syncTo)
{
- LOG(spam, "DocumentDB(%s): sync(): serialNum=%zu", _docTypeName.toString().c_str(), syncTo);
+ LOG(spam, "DocumentDB(%s): sync(): serialNum=%" PRIu64, _docTypeName.toString().c_str(), syncTo);
_feedHandler.syncTls(syncTo);
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp
index c673f615f25..96a14d6d62b 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdb_metrics_updater.cpp
@@ -214,14 +214,14 @@ updateDocumentStoreCacheHitRate(const CacheStats &current, const CacheStats &las
{
if (current.lookups() < last.lookups() || current.hits < last.hits) {
LOG(warning, "Not adding document store cache hit rate metrics as values calculated "
- "are corrupt. current.lookups=%" PRIu64 ", last.lookups=%" PRIu64 ", current.hits=%" PRIu64 ", last.hits=%" PRIu64 ".",
+ "are corrupt. current.lookups=%zu, last.lookups=%zu, current.hits=%zu, last.hits=%zu.",
current.lookups(), last.lookups(), current.hits, last.hits);
} else {
if ((current.lookups() - last.lookups()) > 0xffffffffull
|| (current.hits - last.hits) > 0xffffffffull)
{
LOG(warning, "Document store cache hit rate metrics to add are suspiciously high."
- " lookups diff=%" PRIu64 ", hits diff=%" PRIu64 ".",
+ " lookups diff=%zu, hits diff=%zu.",
current.lookups() - last.lookups(), current.hits - last.hits);
}
cacheHitRate.addTotalValueWithCount(current.hits - last.hits, current.lookups() - last.lookups());
diff --git a/searchcore/src/vespa/searchcore/proton/server/memory_flush_config_updater.cpp b/searchcore/src/vespa/searchcore/proton/server/memory_flush_config_updater.cpp
index 35d6973e34b..3aeb79b51a1 100644
--- a/searchcore/src/vespa/searchcore/proton/server/memory_flush_config_updater.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/memory_flush_config_updater.cpp
@@ -128,7 +128,7 @@ MemoryFlushConfigUpdater::convertConfig(const ProtonConfig::Flush::Memory &confi
const size_t hardMemoryLimit = getHardMemoryLimit(memory);
size_t totalMaxMemory = config.maxmemory;
if (totalMaxMemory > hardMemoryLimit) {
- LOG(info, "flush.memory.maxmemory=%ld cannot"
+ LOG(info, "flush.memory.maxmemory=%" PRId64 " cannot"
" be set above the hard limit of %ld so we cap it to the hard limit",
config.maxmemory,
hardMemoryLimit);
@@ -136,7 +136,7 @@ MemoryFlushConfigUpdater::convertConfig(const ProtonConfig::Flush::Memory &confi
}
size_t eachMaxMemory = config.each.maxmemory;
if (eachMaxMemory > hardMemoryLimit) {
- LOG(info, "flush.memory.each.maxmemory=%ld cannot"
+ LOG(info, "flush.memory.each.maxmemory=%" PRId64 " cannot"
" be set above the hard limit of %ld so we cap it to the hard limit",
config.maxmemory,
hardMemoryLimit);
diff --git a/searchcore/src/vespa/searchcore/proton/server/memoryflush.cpp b/searchcore/src/vespa/searchcore/proton/server/memoryflush.cpp
index d72ef274d99..0372be01d1d 100644
--- a/searchcore/src/vespa/searchcore/proton/server/memoryflush.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/memoryflush.cpp
@@ -171,7 +171,7 @@ MemoryFlush::getFlushTargets(const FlushContext::List &targetList,
"getFlushTargets(): target(%s), totalMemoryGain(%" PRIu64 "), memoryGain(%" PRIu64 "), "
"totalDiskGain(%" PRId64 "), diskGain(%" PRId64 "), "
"tlsSize(%" PRIu64 "), tlsSizeNeeded(%" PRIu64 "), "
- "flushedSerial(%" PRIu64 "), localLastSerial(%" PRIu64 "), serialDiff(%ld), "
+ "flushedSerial(%" PRIu64 "), localLastSerial(%" PRIu64 "), serialDiff(%" PRId64 "), "
"lastFlushTime(%fs), nowTime(%fs), timeDiff(%fs), order(%s)",
targetList[i]->getName().c_str(),
totalMemory,
diff --git a/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp b/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp
index 6e442f472b1..63a4ad63d0e 100644
--- a/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/rpc_hooks.cpp
@@ -99,7 +99,7 @@ RPCHooksBase::reportState(Session & session, FRT_RPCRequest * req)
ret.SetString(&k[i], res[i].key.c_str());
ret.SetString(&v[i], res[i].value.c_str());
}
- LOG(debug, "gen=%ld", session.getGen());
+ LOG(debug, "gen=%" PRId64, session.getGen());
for (uint32_t i = 0; i < res.size(); ++i) {
LOG(debug,
"key=%s, value=%s",
@@ -267,7 +267,7 @@ RPCHooksBase::rpc_GetState(FRT_RPCRequest *req)
uint32_t gen = arg[0]._intval32;
uint32_t timeoutMS = arg[1]._intval32;
const Session::SP & sharedSession = getSession(req);
- LOG(debug, "RPCHooksBase::rpc_GetState(gen=%d, timeoutMS=%d) , but using gen=%ld instead", gen, timeoutMS, sharedSession->getGen());
+ LOG(debug, "RPCHooksBase::rpc_GetState(gen=%d, timeoutMS=%d) , but using gen=%" PRId64 " instead", gen, timeoutMS, sharedSession->getGen());
int64_t numDocs(_proton.getNumDocs());
if (sharedSession->getGen() < 0 || sharedSession->getNumDocs() != numDocs) { // NB Should use something else to define generation.
diff --git a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp
index ef580cf44ce..0a3852d7819 100644
--- a/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/storeonlydocsubdb.cpp
@@ -282,7 +282,7 @@ StoreOnlyDocSubDB::setupDocumentMetaStore(DocumentMetaStoreInitializerResult::SP
}
_bucketDBHandlerInitializer.addDocumentMetaStore(dms.get(), _flushedDocumentMetaStoreSerialNum);
_metaStoreCtx = std::make_shared<DocumentMetaStoreContext>(dms);
- LOG(debug, "Added document meta store '%s' with flushed serial num %lu",
+ LOG(debug, "Added document meta store '%s' with flushed serial num %" PRIu64,
name.c_str(), _flushedDocumentMetaStoreSerialNum);
_dms = dms;
_dmsFlushTarget = std::make_shared<DocumentMetaStoreFlushTarget>(dms, _tlsSyncer, baseDir, dmsResult->tuneFile(),
diff --git a/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp b/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp
index dbac71138e3..d441e6cd22a 100644
--- a/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp
@@ -421,7 +421,7 @@ StoreOnlyFeedView::internalUpdate(FeedToken token, const UpdateOperation &updOp)
const DocumentId &docId = upd.getId();
const Lid lid = updOp.getLid();
VLOG(getDebugLevel(lid, upd.getId()),
- "database(%s): internalUpdate: serialNum(%lu), docId(%s), lid(%d)",
+ "database(%s): internalUpdate: serialNum(%" PRIu64 "), docId(%s), lid(%d)",
_params._docTypeName.toString().c_str(), serialNum,
upd.getId().toString().c_str(), lid);
diff --git a/searchcore/src/vespa/searchcore/proton/server/summaryadapter.cpp b/searchcore/src/vespa/searchcore/proton/server/summaryadapter.cpp
index 3740b2f1f70..dd28938d7c6 100644
--- a/searchcore/src/vespa/searchcore/proton/server/summaryadapter.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/summaryadapter.cpp
@@ -41,7 +41,7 @@ void
SummaryAdapter::put(SerialNum serialNum, const DocumentIdT lid, const vespalib::nbostream &os)
{
if ( ! ignore(serialNum) ) {
- LOG(spam, "SummaryAdapter::put(serialnum = '%zd', lid = %u, stream size = '%zd')",
+ LOG(spam, "SummaryAdapter::put(serialnum = '%" PRIu64 "', lid = %u, stream size = '%zd')",
serialNum, lid, os.size());
_mgr->putDocument(serialNum, lid, os);
_lastSerial = serialNum;
diff --git a/searchcore/src/vespa/searchcore/proton/server/transactionlogmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/transactionlogmanager.cpp
index 72fcf812ebc..2f6eaeadf5c 100644
--- a/searchcore/src/vespa/searchcore/proton/server/transactionlogmanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/transactionlogmanager.cpp
@@ -103,14 +103,14 @@ TransactionLogManager::prepareReplay(TransLogClient &client,
from = std::max(from, prunedToken);
if (serialEnd < flushedSummaryMgrSerial) {
throw IllegalStateException(
- make_string("SummaryStore '%ld' is more recent than "
- "transactionlog '%ld'. Immpossible !!",
+ make_string("SummaryStore '%" PRIu64 "' is more recent than "
+ "transactionlog '%" PRIu64 "'. Immpossible !!",
flushedSummaryMgrSerial, serialEnd));
}
if (serialEnd < flushedIndexMgrSerial) {
throw IllegalStateException(
- make_string("IndexStore '%ld' is more recent than "
- "transactionlog '%ld'. Immpossible !!",
+ make_string("IndexStore '%" PRIu64 "' is more recent than "
+ "transactionlog '%" PRIu64 "'. Immpossible !!",
flushedIndexMgrSerial, serialEnd));
}
}
@@ -141,7 +141,7 @@ TransactionLogManager::startReplay(SerialNum first,
throw IllegalStateException(
make_string(
"Could not start visitor for "
- "replaying domain '%s<%ld, %ld]' on TLS '%s'",
+ "replaying domain '%s<%" PRIu64 ", %" PRIu64 "]' on TLS '%s'",
getDomainName().c_str(),
first, syncToken, getRpcTarget().c_str()));
}