Skip to content

Commit

Permalink
Use unix socket for redis connection (#3190)
Browse files Browse the repository at this point in the history
Why I did this?

Most of the DB connection in buffermgrd is using unix socket. There is only one DB connection which is using TCP socket. It brings a few drawback:

TCP socket is less efficiency
TCP socket may fail if loopback interface is down. It could cause following error:
  • Loading branch information
Junchao-Mellanox authored Jun 21, 2024
1 parent 4b4aaf9 commit 78af15d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cfgmgr/buffermgrd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void dump_db_item(KeyOpFieldsValuesTuple &db_item)

void write_to_state_db(shared_ptr<vector<KeyOpFieldsValuesTuple>> db_items_ptr)
{
DBConnector db("STATE_DB", 0, true);
DBConnector db("STATE_DB", 0);
auto &db_items = *db_items_ptr;
for (auto &db_item : db_items)
{
Expand Down

0 comments on commit 78af15d

Please sign in to comment.