Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[warm restart assist] assume vector values could be reordered #921

Merged
merged 1 commit into from
Jun 3, 2019

Conversation

yxieca
Copy link
Contributor

@yxieca yxieca commented Jun 3, 2019

What I did

When comparing 2 vectors, assume their elements could be re-ordered.

Signed-off-by: Ying Xie ying.xie@microsoft.com

Why I did it
Without he change, during warm reboot, some neighbor entries will be mistakenly judged as having new value and recreated.

How I verified it
With the change, no neighbor entry got recreated due to having 'new value' after warm reboot.

When comparing 2 vectors, assume their elements could be re-ordered.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
@jipanyang
Copy link
Contributor

I would recommend switching to producerstatetabe view comparison mechanism as that being used in teamsyncd. It helps to reduce the maintenance effort, also producerstatetabe view comparison mechanism is more flexible.

@yxieca
Copy link
Contributor Author

yxieca commented Jun 3, 2019

@jipanyang can you point me to an example? I need to get the problem under control first. Can we move on then improve?

@yxieca
Copy link
Contributor Author

yxieca commented Jun 3, 2019

@jipanyang I found the code you are talking about. This code is not generic, it is written for team management only. There needs to have some refactoring and abstracting before it can be generally in other cases. Right? And the comparison is similar to what I added here too.

@yxieca yxieca merged commit f3d0279 into sonic-net:master Jun 3, 2019
@yxieca yxieca deleted the assist branch June 3, 2019 23:12
yxieca added a commit that referenced this pull request Jun 3, 2019
When comparing 2 vectors, assume their elements could be re-ordered.

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
@jipanyang
Copy link
Contributor

@jipanyang can you point me to an example? I need to get the problem under control first. Can we move on then improve?

View switch design and implementation:
https://github.com/Azure/SONiC/blob/master/doc/warm-reboot/view_switch.md
sonic-net/sonic-swss-common#247

Usage example:
#725

We found view switch mechanism is able to handle FV vectors with non-ordered and variable number of fields.
Not sure about 210811 branch, but for master branch I think we should move to view switch mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants