-
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
tests/robustness: Validate all etcd watches opened to etcd #15893
tests/robustness: Validate all etcd watches opened to etcd #15893
Conversation
0760345
to
2ef3492
Compare
2ef3492
to
f27fa70
Compare
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.
LGTM - Just a couple of questions one on a potential edge case, the other just one for my understanding.
|
||
func (h History) MaxRevision() int64 { | ||
var maxRevision int64 | ||
for _, op := range h.successful { |
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.
Do we need to handle a situation where len(h.successful) == 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.
We can maintain special meaning of revision=0
as it's in etcd. Having 0 is still correct as not all clients make KV operations.
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.
LGTM
logger.go:130: 2023-05-15T17:42:37.792+0200 INFO Saving operation history {"path": "/tmp/TestRobustness_ClusterOfSize3_Kubernetes/client-1/operations.json"} | ||
logger.go:130: 2023-05-15T17:42:37.793+0200 INFO Saving watch responses {"path": "/tmp/TestRobustness_ClusterOfSize3_Kubernetes/client-2/watch.json"} |
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.
Is the change accidentally updated? :/
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.
No, it's intentional as file paths change.
} | ||
|
||
func validateGotAtLeastOneProgressNotify(t *testing.T, memberId string, responses []traffic.WatchResponse, expectProgressNotify bool) { | ||
func validateGotAtLeastOneProgressNotify(t *testing.T, reports []traffic.ClientReport, expectProgressNotify bool) { |
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.
Is it expected only one out of x watch clients get one progress notify.
I think all x watch clients should get one, respectively because otherwise, that does not sound right from k8s prospective.
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.
That's not right, manual progress notify is sent back to client requesting it.
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.
etcd/server/etcdserver/api/v3rpc/watch.go
Line 322 in efcbd95
sws.progress[id] = true |
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.
I see. expectProgressNotify
true
means either manual requested or periodic.
Is my statement true for the periodic 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.
Only if all watchers watch a event stream that didn't have any event for required amount of time.
Signed-off-by: Marek Siarkowicz <[email protected]>
f27fa70
to
6429f47
Compare
cc @ahrtr @ptabor @jmhbnz @chaochn47