Skip to content

[test] Build with ComponentStats-based SwssStats (PR sonic-swss#4516 + sonic-swss-common#1180)#27456

Closed
yutongzhang-microsoft wants to merge 2 commits into
sonic-net:masterfrom
yutongzhang-microsoft:swss-stats-implementation-v2
Closed

[test] Build with ComponentStats-based SwssStats (PR sonic-swss#4516 + sonic-swss-common#1180)#27456
yutongzhang-microsoft wants to merge 2 commits into
sonic-net:masterfrom
yutongzhang-microsoft:swss-stats-implementation-v2

Conversation

@yutongzhang-microsoft
Copy link
Copy Markdown
Contributor

Do not merge — recreated on top of current master to resolve the conflicts in #26924.

Repoints both submodules to forks carrying the refactored library + thin-wrapper:

submodule now source PR
src/sonic-swss-common 55673525d58 (feature/component-stats) sonic-swss-common#1180
src/sonic-swss 37100258229 (swss-stats-use-componentstats) sonic-swss#4516

.gitmodules URLs are temporarily switched to https://github.com/yutongzhang-microsoft/... so CI can resolve the non-upstream SHAs.

Supersedes #26924.

How to verify

  1. Build:
    NOSTRETCH=1 NOBULLSEYE=1 make target/docker-orchagent.gz
    make target/sonic-vs.img.gz
    
  2. Boot sonic-vs, then:
    redis-cli -n 2 KEYS "SWSS_STATS:*"
    redis-cli -n 2 HGETALL "SWSS_STATS:PORT_TABLE"
    
    Should show SET / DEL / COMPLETE / ERROR counters incrementing as orchagent processes tasks.

Follow-up

Once both source PRs are merged upstream, this PR will be rewritten to:

  • revert .gitmodules URLs to sonic-net/...
  • bump submodule SHAs to the merged upstream commits

…+ sonic-swss-common#1180)

Recreated on top of current master to resolve conflicts in sonic-net#26924.

Repoints submodules to forks carrying the ComponentStats refactor:
- src/sonic-swss-common -> yutongzhang-microsoft @ feature/component-stats (55673525d58)
- src/sonic-swss        -> yutongzhang-microsoft @ swss-stats-use-componentstats (37100258229)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
@yutongzhang-microsoft yutongzhang-microsoft force-pushed the swss-stats-implementation-v2 branch from 23818d2 to 8d6f951 Compare May 20, 2026 02:20
@yutongzhang-microsoft
Copy link
Copy Markdown
Contributor Author

/azpw run

3 similar comments
@liushilongbuaa
Copy link
Copy Markdown
Contributor

/azpw run

@liushilongbuaa
Copy link
Copy Markdown
Contributor

/azpw run

@liushilongbuaa
Copy link
Copy Markdown
Contributor

/azpw run

@mssonicbld
Copy link
Copy Markdown
Collaborator

⚠️ Notice: /azpw run only runs failed jobs now. If you want to trigger a whole pipline run, please rebase your branch or close and reopen the PR.
💡 Tip: You can also use /azpw retry to retry failed jobs directly.

Retrying failed(or canceled) jobs...

@mssonicbld
Copy link
Copy Markdown
Collaborator

No Azure DevOps builds found for #27456.

@liushilongbuaa
Copy link
Copy Markdown
Contributor

/azpw run

@mssonicbld
Copy link
Copy Markdown
Collaborator

⚠️ Notice: /azpw run only runs failed jobs now. If you want to trigger a whole pipline run, please rebase your branch or close and reopen the PR.
💡 Tip: You can also use /azpw retry to retry failed jobs directly.

Retrying failed(or canceled) jobs...

@mssonicbld
Copy link
Copy Markdown
Collaborator

No Azure DevOps builds found for #27456.

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@liushilongbuaa
Copy link
Copy Markdown
Contributor

/azpw run

@mssonicbld
Copy link
Copy Markdown
Collaborator

⚠️ Notice: /azpw run only runs failed jobs now. If you want to trigger a whole pipline run, please rebase your branch or close and reopen the PR.
💡 Tip: You can also use /azpw retry to retry failed jobs directly.

Retrying failed(or canceled) jobs...

@mssonicbld
Copy link
Copy Markdown
Collaborator

No failed(or canceled) stages or jobs found in the most recent build 1118130.

@liushilongbuaa
Copy link
Copy Markdown
Contributor

/azpw run

@mssonicbld
Copy link
Copy Markdown
Collaborator

⚠️ Notice: /azpw run only runs failed jobs now. If you want to trigger a whole pipline run, please rebase your branch or close and reopen the PR.
💡 Tip: You can also use /azpw retry to retry failed jobs directly.

Retrying failed(or canceled) jobs...

@mssonicbld
Copy link
Copy Markdown
Collaborator

No failed(or canceled) stages or jobs found in the most recent build 1118130.

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@yutongzhang-microsoft
Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

yutongzhang-microsoft added a commit to yutongzhang-microsoft/sonic-buildimage that referenced this pull request May 27, 2026
…+ sonic-swss-common#1180)

Recreated on top of fresh upstream master to drop the conflicts from
sonic-net#27456.

Repoints two submodules to forks carrying the refactored library +
thin-wrapper:

| submodule | now | source PR |
|---|---|---|
| src/sonic-swss-common | b21b74e (feature/component-stats) | sonic-net/sonic-swss-common#1180 |
| src/sonic-swss        | 3710025 (swss-stats-use-componentstats) | sonic-net/sonic-swss#4516 |

.gitmodules URLs are temporarily switched to https://github.com/yutongzhang-microsoft/...
so CI can resolve the non-upstream SHAs.

The swss-common SHA already includes banidoru's review fixes
(lock-free hot path via shared_mutex + merged lookupOrCreate, final
flush on shutdown, registry pruning, setValue exclusive lock + docs).

Supersedes sonic-net#27456.

Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@yutongzhang-microsoft
Copy link
Copy Markdown
Contributor Author

Superseded by #27554 — recreated on top of fresh upstream master to drop the conflicts that had accumulated here. New PR also bumps swss-common to b21b74e which includes banidoru's review fixes from sonic-net/sonic-swss-common#1180.

…review fixes)

Picks up review fixes from sonic-net/sonic-swss-common#1180 that
address banidoru's feedback:
* Lock-free hot path via shared_mutex + merged lookupOrCreate
* Final flush on shutdown so no in-flight updates are dropped
* Registry pruning of expired weak_ptr slots
* setValue exclusive lock + documented gauge/counter mixing caveat

Public API (increment/setValue/get/getAll/setEnabled/stop) is
unchanged, so sonic-swss SwssStats facade does not need to move.

Signed-off-by: Yutong Zhang <yutongzhang@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

3 participants