Skip to content

Commit

Permalink
Handled Review comments given on Jun 2.
Browse files Browse the repository at this point in the history
  • Loading branch information
srj102 committed Jun 3, 2020
1 parent cabf417 commit 75dd74c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 39 deletions.
1 change: 1 addition & 0 deletions common/schema.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ namespace swss {
#define APP_NAT_GLOBAL_TABLE_NAME "NAT_GLOBAL_TABLE"
#define APP_NAPT_POOL_IP_TABLE_NAME "NAPT_POOL_IP_TABLE"

#define APP_STP_VLAN_TABLE_NAME "STP_VLAN_TABLE"
#define APP_STP_VLAN_PORT_TABLE_NAME "STP_VLAN_PORT_TABLE"
#define APP_STP_VLAN_INSTANCE_TABLE_NAME "STP_VLAN_INSTANCE_TABLE"
#define APP_STP_PORT_TABLE_NAME "STP_PORT_TABLE"
Expand Down
34 changes: 0 additions & 34 deletions common/warm_restart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,40 +195,6 @@ void WarmStart::setWarmStartState(const std::string &app_name, WarmStartState st
warmStartStateNameMap.at(state).c_str());
}

void WarmStart::getWarmStartState(const std::string &app_name, WarmStartState &state)
{
//WarmStartStateNameMap::iterator it;
std::string statestr;

auto& warmStart = getInstance();

state = RECONCILED;

if(!isWarmStart())
return;

warmStart.m_stateWarmRestartTable->hget(app_name, "state", statestr);

/* If warm-start is enabled, state cannot be assumed as Reconciled
* It should be set to unknown
*/
state = WSUNKNOWN;

for(std::map<WarmStart::WarmStartState, std::string>::const_iterator it = warmStartStateNameMap.begin(); it != warmStartStateNameMap.end(); it++)
{
if(it->second == statestr)
{
state = it->first;
break;
}
}

SWSS_LOG_INFO("%s warm start state get %s(%d)",
app_name.c_str(), statestr.c_str(), state);

return;
}

// Set the WarmStart data check state for a particular application.
void WarmStart::setDataCheckState(const std::string &app_name, DataCheckStage stage, DataCheckState state)
{
Expand Down
5 changes: 0 additions & 5 deletions common/warm_restart.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class WarmStart
INITIALIZED,
RESTORED,
RECONCILED,
WSUNKNOWN,
};

enum DataCheckState
Expand Down Expand Up @@ -57,10 +56,6 @@ class WarmStart
static void setWarmStartState(const std::string &app_name,
WarmStartState state);

static void getWarmStartState(const std::string &app_name,
WarmStartState &state);


static uint32_t getWarmStartTimer(const std::string &app_name,
const std::string &docker_name);

Expand Down

0 comments on commit 75dd74c

Please sign in to comment.