Skip to content

Add Redis population support class#4

Open
FengPan-Frank wants to merge 5 commits intomasterfrom
fenpan_redis
Open

Add Redis population support class#4
FengPan-Frank wants to merge 5 commits intomasterfrom
fenpan_redis

Conversation

@FengPan-Frank
Copy link
Copy Markdown
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));
Copy link
Copy Markdown

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
Copy Markdown
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() {
Copy link
Copy Markdown

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
Copy Markdown
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.

peer_info_key += p_entry.peer_rd;


if (bmp_type != parseBMP::TYPE_PEER_UP)
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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