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

Continuous ProducerStateTable del/set call may leave stale FV in table data #236

Closed
jipanyang opened this issue Sep 26, 2018 · 5 comments
Closed

Comments

@jipanyang
Copy link
Contributor

One scenario:

Existing table data -- Key1 : f1/v1, f2/v2

Two produceStateTable operation on key1, del then set,

del --- key1

set --- key1: f1/v1, f3/v3

producerStateTable uses SADD to store key1, del and set may be combined if consumerState is not quick enough to pickup del before set. what is left in redis DB will be:

key1: f1/v1, f2/v2, f3/v3

While the correct one should be key1: f1/v1, f3/v3

The merge of of del and set may trigger other unexpected behavior for the user of consumerState.

@xinliu-seattle
Copy link

This will be triaged.

@lguohan
Copy link
Contributor

lguohan commented Oct 5, 2018

@jipanyang , is this design issue or not? can you triage it?

@nikos-github
Copy link

@lguohan @jipanyang Jipan explained to me under what circumstances this problem will occur and that right now since the prefix's set is fixed (field set for key prefix doesn’t change), it can not happen.

@jipanyang
Copy link
Contributor Author

Right, for route BGP provide two fields "nexthop" and "ifname", for neighbor, they are "family" and "neigh", new FV will overwrite old FV.

Possibly problem could happen with those applications in cfgMgr which may have variable number of fields for each set via ProducerStateTable.

@jipanyang
Copy link
Contributor Author

Fixed.

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

No branches or pull requests

4 participants