-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
WIP: test if watch is sequential #18264
base: main
Are you sure you want to change the base?
Conversation
Hi @ah8ad3. Thanks for your PR. I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
1aa13de
to
9347f8e
Compare
9347f8e
to
caaf1f0
Compare
Printed the revisions it seems not checking revision 0 is not working here
First one is 2 and revision is incremental. |
Can you please take another look? @serathius |
Please rebase |
…ial to check memberID in events Signed-off-by: ah8ad3 <ah8ad3@gmail.com>
…revision based one time of response Signed-off-by: ah8ad3 <ah8ad3@gmail.com>
a6ec18c
to
f7c6c33
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ah8ad3 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Done, PTAL @serathius At end i will squash. |
for _, r := range reports { | ||
for _, op := range r.Watch { | ||
for _, resp := range op.Responses { | ||
if len(resp.Events) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to double check, but I think we could consider recording progress notify here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the responses are aggregated here we can do.
for i, c := range combinedWatchResponses[resp.MemberId] { | ||
// Reports are sorted by time, find first greater or equal and use previous one. | ||
if resp.Time >= c.time { | ||
if i == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why skip the first one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for review, i'm using an logic here which is find the first equal or greater and use previous one. And there is nothing before 0.
And if i remember correctly we aggregate all responses here, and there is nothing before the first response.
if op.Request.Revision != 0 { | ||
continue | ||
} | ||
for _, resp := range op.Responses { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if len(resp.Events) == 0 {
continue
}
if resp.Events[0].Revision < lastSeenRevision {
t.Errorf("Watch has gone back")
}
lastSeenRevision = resp.Events[len(resp.Events)-1].Revision
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
WIP:
Added member id in
WatchResponse
.Change
validateOrdered
to check forMemberId
for each event, as sequential should check for each process.Fixes #18141