Skip to content

Commit

Permalink
Merge "Move non-db tasks to another task in exclusion with db task."
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Apr 22, 2016
2 parents aa2bebb + 2408450 commit 6499d15
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
7 changes: 5 additions & 2 deletions src/vnsw/agent/cmn/agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ void Agent::SetAgentTaskPolicy() {
kTaskHealthCheck,
kTaskDBExclude,
AGENT_SHUTDOWN_TASKNAME,
AGENT_INIT_TASKNAME
AGENT_INIT_TASKNAME,
AGENT_SANDESH_TASKNAME
};
SetTaskPolicyOne("db::DBTable", db_exclude_list,
sizeof(db_exclude_list) / sizeof(char *));
Expand Down Expand Up @@ -169,7 +170,8 @@ void Agent::SetAgentTaskPolicy() {
"io::ReaderTask",
"Agent::PktFlowResponder",
AGENT_SHUTDOWN_TASKNAME,
AGENT_INIT_TASKNAME
AGENT_INIT_TASKNAME,
AGENT_SANDESH_TASKNAME
};
SetTaskPolicyOne("sandesh::RecvQueue", sandesh_exclude_list,
sizeof(sandesh_exclude_list) / sizeof(char *));
Expand Down Expand Up @@ -252,6 +254,7 @@ void Agent::SetAgentTaskPolicy() {
"xmpp::StateMachine",
"http client",
"db::DBTable",
AGENT_SANDESH_TASKNAME,
AGENT_SHUTDOWN_TASKNAME
};
SetTaskPolicyOne(AGENT_INIT_TASKNAME, agent_init_exclude_list,
Expand Down
1 change: 1 addition & 0 deletions src/vnsw/agent/cmn/agent.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ extern void RouterIdDepInit(Agent *agent);
#define AGENT_INIT_TASKNAME "Agent::Init"
#define AGENT_SHUTDOWN_TASKNAME "Agent::Shutdown"
#define AGENT_FLOW_STATS_MANAGER_TASK "Agent::FlowStatsManager"
#define AGENT_SANDESH_TASKNAME "Agent::Sandesh"
#define IPV4_MULTICAST_BASE_ADDRESS "224.0.0.0"
#define IPV6_MULTICAST_BASE_ADDRESS "ff00::"
#define MULTICAST_BASE_ADDRESS_PLEN 8
Expand Down
2 changes: 1 addition & 1 deletion src/vnsw/agent/controller/controller_cleanup_timer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ CleanupTimer::CleanupTimer(Agent *agent, const std::string &timer_name,
TimerManager::CreateTimer(*(agent->event_manager()->
io_service()), timer_name,
TaskScheduler::GetInstance()->
GetTaskId("db::DBTable"), 0);
GetTaskId("Agent::ControllerXmpp"), 0);
}

CleanupTimer::~CleanupTimer() {
Expand Down
2 changes: 1 addition & 1 deletion src/vnsw/agent/oper/agent_sandesh.cc
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ void PageReq::HandleRequest() const {
///////////////////////////////////////////////////////////////////////////
AgentSandeshManager::AgentSandeshManager(Agent *agent) :
agent_(agent),
page_request_queue_(TaskScheduler::GetInstance()->GetTaskId("db::DBTable"),
page_request_queue_(TaskScheduler::GetInstance()->GetTaskId(AGENT_SANDESH_TASKNAME),
0, boost::bind(&AgentSandeshManager::Run, this, _1)) {
page_request_queue_.set_name("Introspect page request");
}
Expand Down
2 changes: 1 addition & 1 deletion src/vnsw/agent/oper/physical_device_vn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ class ConfigPhysicalDeviceVnSandesh : public Task {
public:
ConfigPhysicalDeviceVnSandesh(Agent *agent, PhysicalDeviceVnTable *table,
const string &key, const string &context) :
Task(agent->task_scheduler()->GetTaskId("db::DBTable"), 0),
Task(agent->task_scheduler()->GetTaskId(AGENT_SANDESH_TASKNAME), 0),
table_(table), key_(key), context_(context) { }
~ConfigPhysicalDeviceVnSandesh() { }
virtual bool Run();
Expand Down
2 changes: 1 addition & 1 deletion src/vnsw/agent/oper/vxlan.cc
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ class VxLanConfigSandeshTask : public Task {
public:
VxLanConfigSandeshTask(Agent *agent, uint32_t vxlan_id, const string &vn,
const string &active, const string &context) :
Task(agent->task_scheduler()->GetTaskId("db::DBTable"), 0),
Task(agent->task_scheduler()->GetTaskId(AGENT_SANDESH_TASKNAME), 0),
agent_(agent), vxlan_id_(vxlan_id), vn_(vn), active_(active),
context_(context) { }
~VxLanConfigSandeshTask() { }
Expand Down

0 comments on commit 6499d15

Please sign in to comment.