SWSSDBConnector_new_keyed to c-api#1026
Merged
qiluo-msft merged 4 commits intosonic-net:masterfrom Jun 13, 2025
Merged
Conversation
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull Request Overview
This PR reopens a previous pull request to introduce a new API function SWSSDBConnector_new_keyed that allows a Rust client to access multiple Redis instances in different containers and namespaces.
- Added a new API function in both header and source files to support keyed connectors.
- Extended the unit tests to verify that an empty containerName and netns result in behavior identical to the original SWSSDBConnector_new_named.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/c_api_ut.cpp | Added test for new_keyed, checking equivalence with new_named |
| common/c-api/dbconnector.h | Declared the new_keyed function prototype |
| common/c-api/dbconnector.cpp | Implemented the new_keyed function using keyed parameters |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
r12f
approved these changes
Jun 13, 2025
Collaborator
|
Cherry-pick PR to msft-202412: Azure/sonic-swss-common.msft#61 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is to reopen #991
The rust code using swss-common needs to access redis instances from different containers and namespaces.