Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Redis population support class #4

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

FengPan-Frank
Copy link
Owner

Add Redis population support class

@FengPan-Frank FengPan-Frank force-pushed the fenpan_redis branch 4 times, most recently from 7d65ace to 675efa0 Compare March 26, 2024 15:23
std::vector<std::pair<std::string, std::string> > fieldValues;
std::string nei;
nei = peer.peer_addr;
fieldValues.push_back(std::make_pair("peer_addr", nei));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::

You can remove std:: in cpp files if you have using

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update this at last moment to avoid possible namespace overlap.

/*********************************************************************//**
* Get singleton instance for class
***********************************************************************/
RedisManager& RedisManager::getInstance() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getInstance

Is there a similar class in the codebase? Is it using singleton pattern?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, just want to keep it simple without passing reference to multiple places, as redis holds dedicated session meanwhile.

@@ -134,7 +134,8 @@ bool BMPReader::ReadIncomingMsg(BMPListener::ClientInfo *client) {
peer_info_key = p_entry.peer_addr;
peer_info_key += p_entry.peer_rd;


if (bmp_type != parseBMP::TYPE_PEER_UP)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TYPE_PEER_UP

Why redis need this? how about sql?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sql path has this, I removed it from master when bring up pipeline to avoid resolving kafka dependency issue. refer https://github.com/FengPan-Frank/sonic-bmp/pull/1/files#diff-3603581512f176e859579625d032262b922c76fa5fc3a44178d6e66ad1a176ea as initial commit.

@FengPan-Frank FengPan-Frank force-pushed the fenpan_redis branch 2 times, most recently from 139fc19 to 1ddd701 Compare March 28, 2024 07:40
@FengPan-Frank
Copy link
Owner Author

sonic-net/sonic-bmp#4, use public repo PR instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants