Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…wss-common into zmq
  • Loading branch information
divyagayathri-hcl committed Dec 6, 2024
2 parents bbbe998 + fb6ce44 commit bbd22b4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion common/schema.h
Original file line number Diff line number Diff line change
Expand Up @@ -475,11 +475,12 @@ namespace swss {

#define CFG_SUPPRESS_ASIC_SDK_HEALTH_EVENT_NAME "SUPPRESS_ASIC_SDK_HEALTH_EVENT"

#define CFG_MEMORY_STATISTICS_TABLE_NAME "MEMORY_STATISTICS"

#define CFG_PAC_PORT_CONFIG_TABLE "PAC_PORT_CONFIG_TABLE"
#define CFG_PAC_GLOBAL_CONFIG_TABLE "PAC_GLOBAL_CONFIG_TABLE"
#define CFG_PAC_HOSTAPD_GLOBAL_CONFIG_TABLE "HOSTAPD_GLOBAL_CONFIG_TABLE"


/***** STATE DATABASE *****/

#define STATE_SWITCH_CAPABILITY_TABLE_NAME "SWITCH_CAPABILITY"
Expand Down
2 changes: 1 addition & 1 deletion common/zmqclient.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ZmqClient

private:
void initialize(const std::string& endpoint, const std::string& vrf);
// void initialize(const std::string& endpoint);
void initialize(const std::string& endpoint);

std::string m_endpoint;

Expand Down
7 changes: 6 additions & 1 deletion common/zmqserver.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <unistd.h>
#include <string>
#include <deque>
#include <limits>
Expand Down Expand Up @@ -229,14 +230,18 @@ void ZmqServer::sendMsg(const std::string& dbName, const std::string& tableName,
auto message = "zmq send failed, endpoint: " + m_endpoint + ", error: " + to_string(rc);
SWSS_LOG_ERROR("%s", message.c_str());
// throw system_error(make_error_code(errc::io_error), message);
// SWSS_LOG_THROW("Else case message is: %s", message.c_str());
return;
}
usleep(retry_delay * 1000);
}

// failed after retry
auto message = "zmq send failed, endpoint: " + m_endpoint + ", zmqerrno: " + to_string(zmq_err) + ":" + zmq_strerror(zmq_err) + ", msg length:" + to_string(serializedlen);
SWSS_LOG_ERROR("%s", message.c_str());
throw system_error(make_error_code(errc::io_error), message);
// throw system_error(make_error_code(errc::io_error), message);
// SWSS_LOG_THROW("Last Error message is %s", message.c_str());
return;
}

}

0 comments on commit bbd22b4

Please sign in to comment.