diff --git a/src/cpp/ripple/HashedObject.cpp b/src/cpp/ripple/HashedObject.cpp index aa5dc56618..7505a4c24e 100644 --- a/src/cpp/ripple/HashedObject.cpp +++ b/src/cpp/ripple/HashedObject.cpp @@ -60,6 +60,7 @@ void HashedObjectStore::waitWrite() void HashedObjectStore::bulkWrite() { + LoadEvent::pointer event = theApp->getJobQueue().getLoadEvent(jtDISK); while (1) { std::vector< boost::shared_ptr > set; diff --git a/src/cpp/ripple/JobQueue.cpp b/src/cpp/ripple/JobQueue.cpp index a371875dde..a72e8ddae0 100644 --- a/src/cpp/ripple/JobQueue.cpp +++ b/src/cpp/ripple/JobQueue.cpp @@ -22,6 +22,7 @@ const char* Job::toString(JobType t) case jtDEATH: return "jobOfDeath"; case jtCLIENT: return "clientCommand"; case jtPEER: return "peerCommand"; + case jtDISK: return "diskAccess"; default: assert(false); return "unknown"; } } diff --git a/src/cpp/ripple/JobQueue.h b/src/cpp/ripple/JobQueue.h index 33694c2559..339804d206 100644 --- a/src/cpp/ripple/JobQueue.h +++ b/src/cpp/ripple/JobQueue.h @@ -35,6 +35,7 @@ enum JobType // special types not dispatched by the job pool jtCLIENT = 10, jtPEER = 11, + jtDISK = 12, }; #define NUM_JOB_TYPES 16 diff --git a/src/cpp/ripple/Ledger.cpp b/src/cpp/ripple/Ledger.cpp index 03e0a48d1b..8f6d87e798 100644 --- a/src/cpp/ripple/Ledger.cpp +++ b/src/cpp/ripple/Ledger.cpp @@ -341,6 +341,7 @@ uint256 Ledger::getHash() void Ledger::saveAcceptedLedger(bool fromConsensus) { // can be called in a different thread + LoadEvent::pointer event = theApp->getJobQueue().getLoadEvent(jtDISK); cLog(lsTRACE) << "saveAcceptedLedger " << (fromConsensus ? "fromConsensus " : "fromAcquire ") << getLedgerSeq(); static boost::format ledgerExists("SELECT LedgerSeq FROM Ledgers where LedgerSeq = %d;"); static boost::format deleteLedger("DELETE FROM Ledgers WHERE LedgerSeq = %d;"); diff --git a/src/cpp/ripple/ValidationCollection.cpp b/src/cpp/ripple/ValidationCollection.cpp index acb6c2c4b3..cab64a9508 100644 --- a/src/cpp/ripple/ValidationCollection.cpp +++ b/src/cpp/ripple/ValidationCollection.cpp @@ -289,6 +289,7 @@ void ValidationCollection::condWrite() void ValidationCollection::doWrite() { + LoadEvent::pointer event = theApp->getJobQueue().getLoadEvent(jtDISK); static boost::format insVal("INSERT INTO LedgerValidations " "(LedgerHash,NodePubKey,Flags,SignTime,Signature) VALUES ('%s','%s','%u','%u',%s);");