mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-28 15:05:53 +00:00
Fix NetworkOPs timer to use JobQueue (2 new JobTypes added)
This commit is contained in:
@@ -92,11 +92,15 @@ void NetworkOPs::onDeadlineTimer (DeadlineTimer& timer)
|
||||
{
|
||||
if (timer == m_netTimer)
|
||||
{
|
||||
processNetTimer ();
|
||||
getApp().getJobQueue ().addJob (jtNETOP_TIMER, "NetworkOPs::processNetTimer",
|
||||
BIND_TYPE (&NetworkOPs::processNetTimer, this));
|
||||
//processNetTimer ();
|
||||
}
|
||||
else if (timer == m_clusterTimer)
|
||||
{
|
||||
doClusterReport();
|
||||
getApp().getJobQueue ().addJob (jtNETOP_CLUSTER, "NetworkOPs::doClusterReport",
|
||||
BIND_TYPE (&NetworkOPs::processNetTimer, this));
|
||||
//doClusterReport();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,93 +55,40 @@ const char* Job::toString (JobType t)
|
||||
{
|
||||
switch (t)
|
||||
{
|
||||
case jtINVALID:
|
||||
return "invalid";
|
||||
case jtINVALID: return "invalid";
|
||||
case jtPACK: return "makeFetchPack";
|
||||
case jtPUBOLDLEDGER: return "publishAcqLedger";
|
||||
case jtVALIDATION_ut: return "untrustedValidation";
|
||||
case jtPROOFWORK: return "proofOfWork";
|
||||
case jtTRANSACTION_l: return "localTransaction";
|
||||
case jtPROPOSAL_ut: return "untrustedProposal";
|
||||
case jtLEDGER_DATA: return "ledgerData";
|
||||
case jtUPDATE_PF: return "updatePaths";
|
||||
case jtCLIENT: return "clientCommand";
|
||||
case jtTRANSACTION: return "transaction";
|
||||
case jtADVANCE: return "advanceLedger";
|
||||
case jtPUBLEDGER: return "publishNewLedger";
|
||||
case jtTXN_DATA: return "fetchTxnData";
|
||||
case jtWAL: return "writeAhead";
|
||||
case jtVALIDATION_t: return "trustedValidation";
|
||||
case jtWRITE: return "writeObjects";
|
||||
case jtPROPOSAL_t: return "trustedProposal";
|
||||
case jtSWEEP: return "sweep";
|
||||
case jtNETOP_CLUSTER: return "clusterReport";
|
||||
case jtNETOP_TIMER: return "heartbeat";
|
||||
|
||||
case jtPACK:
|
||||
return "makeFetchPack";
|
||||
|
||||
case jtPUBOLDLEDGER:
|
||||
return "publishAcqLedger";
|
||||
|
||||
case jtVALIDATION_ut:
|
||||
return "untrustedValidation";
|
||||
|
||||
case jtPROOFWORK:
|
||||
return "proofOfWork";
|
||||
|
||||
case jtPROPOSAL_ut:
|
||||
return "untrustedProposal";
|
||||
|
||||
case jtLEDGER_DATA:
|
||||
return "ledgerData";
|
||||
|
||||
case jtUPDATE_PF:
|
||||
return "updatePaths";
|
||||
|
||||
case jtCLIENT:
|
||||
return "clientCommand";
|
||||
|
||||
case jtTRANSACTION:
|
||||
return "transaction";
|
||||
|
||||
case jtPUBLEDGER:
|
||||
return "publishNewLedger";
|
||||
|
||||
case jtADVANCE:
|
||||
return "advanceLedger";
|
||||
|
||||
case jtVALIDATION_t:
|
||||
return "trustedValidation";
|
||||
|
||||
case jtWAL:
|
||||
return "writeAhead";
|
||||
|
||||
case jtWRITE:
|
||||
return "writeObjects";
|
||||
|
||||
case jtTRANSACTION_l:
|
||||
return "localTransaction";
|
||||
|
||||
case jtPROPOSAL_t:
|
||||
return "trustedProposal";
|
||||
|
||||
case jtADMIN:
|
||||
return "administration";
|
||||
|
||||
case jtPEER:
|
||||
return "peerCommand";
|
||||
|
||||
case jtDISK:
|
||||
return "diskAccess";
|
||||
|
||||
case jtACCEPTLEDGER:
|
||||
return "acceptLedger";
|
||||
|
||||
case jtTXN_PROC:
|
||||
return "processTransaction";
|
||||
|
||||
case jtTXN_DATA:
|
||||
return "fetchTxnData";
|
||||
|
||||
case jtOB_SETUP:
|
||||
return "orderBookSetup";
|
||||
|
||||
case jtPATH_FIND:
|
||||
return "pathFind";
|
||||
|
||||
case jtHO_READ:
|
||||
return "nodeRead";
|
||||
|
||||
case jtHO_WRITE:
|
||||
return "nodeWrite";
|
||||
|
||||
case jtSWEEP:
|
||||
return "sweep";
|
||||
|
||||
case jtGENERIC:
|
||||
return "generic";
|
||||
case jtADMIN: return "administration";
|
||||
|
||||
// special types not dispatched by the job pool
|
||||
case jtPEER: return "peerCommand";
|
||||
case jtDISK: return "diskAccess";
|
||||
case jtACCEPTLEDGER: return "acceptLedger";
|
||||
case jtTXN_PROC: return "processTransaction";
|
||||
case jtOB_SETUP: return "orderBookSetup";
|
||||
case jtPATH_FIND: return "pathFind";
|
||||
case jtHO_READ: return "nodeRead";
|
||||
case jtHO_WRITE: return "nodeWrite";
|
||||
case jtGENERIC: return "generic";
|
||||
default:
|
||||
assert (false);
|
||||
return "unknown";
|
||||
|
||||
@@ -31,7 +31,9 @@ enum JobType
|
||||
jtWRITE = 16, // Write out hashed objects
|
||||
jtPROPOSAL_t = 17, // A proposal from a trusted source
|
||||
jtSWEEP = 18, // Sweep for stale structures
|
||||
jtADMIN = 19, // An administrative operation
|
||||
jtNETOP_CLUSTER = 19, // NetworkOPs cluster peer report
|
||||
jtNETOP_TIMER = 20, // NetworkOPs net timer processing
|
||||
jtADMIN = 21, // An administrative operation
|
||||
|
||||
// special types not dispatched by the job pool
|
||||
jtPEER = 24,
|
||||
@@ -43,7 +45,7 @@ enum JobType
|
||||
jtHO_READ = 30,
|
||||
jtHO_WRITE = 31,
|
||||
jtGENERIC = 32, // Used just to measure time
|
||||
}; // CAUTION: If you add new types, add them to JobType.cpp too
|
||||
}; // CAUTION: If you add new types, add them to ripple_Job.cpp too
|
||||
|
||||
// VFALCO TODO move this into the enum so it calculates itself?
|
||||
#define NUM_JOB_TYPES 48 // why 48 and not 32?
|
||||
|
||||
Reference in New Issue
Block a user