-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[QoS] Resolve an issue in the sequence where a referenced object remo…
…ved and then the referencing object deleting and then re-adding (#2210) - What I did Resolve an issue in the following scenario Suppose object a in table A references object b in table B. When a user is going to remove items in table A and B, the notifications can be received in the following order: The notification of removing object b Then the notification of removing object a And then the notification of re-adding object a The notification of re-adding object b. Object b can not be removed in the 1st step because it is still referenced by object a. In case the system is busy, the notification of removing a remains in m_toSync when the notification of re-adding it is coming, which results in both notifications being handled together and the reference to object b not being cleared. As a result, notification of removing b will never be handled and remain in m_toSync forever. Solution: Introduce a flag pending remove indicating whether an object is about to be removed but pending on some reference. pending remove is set once a DEL notification is received for an object with non-zero reference. When resolving references in step 3, a pending remove object will be skipped and the notification will remain in m_toSync. SET operation will not be carried out in case there is a pending remove flag on the object to be set. By doing so, when object a is re-added in step 3, it can not retrieve the dependent object b. And step 1 will be handled and drained successfully. - Why I did it Fix bug. - How I verified it Mock test and manually test (eg. config qos reload) Signed-off-by: Stephen Sun <stephens@nvidia.com>
- Loading branch information
Showing
8 changed files
with
614 additions
and
75 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.