[Syncd] make sure syncd can exit gracefully#321
Merged
yxieca merged 5 commits intosonic-net:masterfrom May 24, 2018
Merged
Conversation
Contributor
yxieca
commented
May 24, 2018
- Stop notification thread before removing switch
- Stop flex counter queries before removing switch
So that we could join() it at shutdown time. Signed-off-by: Ying Xie <[email protected]>
kcudnik
reviewed
May 24, 2018
syncd/syncd_notifications.cpp
Outdated
| while (runThread) | ||
| { | ||
| cv.wait(ulock); | ||
| if (! runThread) break; |
Collaborator
There was a problem hiding this comment.
this is not needed, it will be checked after tryDequeue anyway
kcudnik
reviewed
May 24, 2018
|
|
||
| ntf_process_thread = std::make_shared<std::thread>(ntf_process_function); | ||
|
|
||
| ntf_process_thread->detach(); |
Collaborator
There was a problem hiding this comment.
yea this was causing issue
Contributor
Author
|
This change has been tested with sonic-net/sonic-mgmt#631 for more than 20 iterations. All passed. |
lguohan
approved these changes
May 24, 2018
yxieca
added a commit
that referenced
this pull request
May 24, 2018
[syncd] stop notification thread before calling remove_switch() [notif] don't detach syncd notification thread So that we could join() it at shutdown time. Signed-off-by: Ying Xie <[email protected]> [flex counter] remove all flex counters before exiting syncd Remove the early quit Add log enter to removeAllCounters()
yxieca
added a commit
to yxieca/sonic-sairedis
that referenced
this pull request
May 24, 2018
[syncd] stop notification thread before calling remove_switch() [notif] don't detach syncd notification thread So that we could join() it at shutdown time. Signed-off-by: Ying Xie <[email protected]> [flex counter] remove all flex counters before exiting syncd Remove the early quit Add log enter to removeAllCounters()
lguohan
pushed a commit
that referenced
this pull request
May 24, 2018
[syncd] stop notification thread before calling remove_switch() [notif] don't detach syncd notification thread So that we could join() it at shutdown time. Signed-off-by: Ying Xie <[email protected]> [flex counter] remove all flex counters before exiting syncd Remove the early quit Add log enter to removeAllCounters()
pettershao-ragilenetworks
pushed a commit
to pettershao-ragilenetworks/sonic-sairedis
that referenced
this pull request
Nov 18, 2022
[syncd] stop notification thread before calling remove_switch() [notif] don't detach syncd notification thread So that we could join() it at shutdown time. Signed-off-by: Ying Xie <[email protected]> [flex counter] remove all flex counters before exiting syncd Remove the early quit Add log enter to removeAllCounters()
pettershao-ragilenetworks
pushed a commit
to pettershao-ragilenetworks/sonic-sairedis
that referenced
this pull request
Nov 18, 2022
[syncd] stop notification thread before calling remove_switch() [notif] don't detach syncd notification thread So that we could join() it at shutdown time. Signed-off-by: Ying Xie <[email protected]> [flex counter] remove all flex counters before exiting syncd Remove the early quit Add log enter to removeAllCounters()
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.