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

tests/robustness: Validate all etcd watches opened to etcd #15893

Merged
merged 1 commit into from
May 16, 2023

Conversation

serathius
Copy link
Member

@serathius serathius force-pushed the robustness-validate-client-watch branch 3 times, most recently from 0760345 to 2ef3492 Compare May 15, 2023 17:52
tests/robustness/watch.go Outdated Show resolved Hide resolved
tests/robustness/report.go Show resolved Hide resolved
@serathius serathius force-pushed the robustness-validate-client-watch branch from 2ef3492 to f27fa70 Compare May 15, 2023 20:26
Copy link
Member

@jmhbnz jmhbnz left a 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 {
Copy link
Member

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?

Copy link
Member Author

@serathius serathius May 16, 2023

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.

tests/robustness/traffic/client.go Show resolved Hide resolved
Copy link
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

tests/robustness/traffic/client.go Show resolved Hide resolved
Comment on lines +44 to +45
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"}
Copy link
Member

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? :/

Copy link
Member Author

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.

tests/robustness/watch.go Show resolved Hide resolved
}

func validateGotAtLeastOneProgressNotify(t *testing.T, memberId string, responses []traffic.WatchResponse, expectProgressNotify bool) {
func validateGotAtLeastOneProgressNotify(t *testing.T, reports []traffic.ClientReport, expectProgressNotify bool) {
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sws.progress[id] = true
cc @chaochn47

Copy link
Member

@chaochn47 chaochn47 May 16, 2023

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?

Copy link
Member Author

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 <siarkowicz@google.com>
@serathius serathius force-pushed the robustness-validate-client-watch branch from f27fa70 to 6429f47 Compare May 16, 2023 08:28
@serathius serathius merged commit f3c9db9 into etcd-io:main May 16, 2023
@serathius serathius deleted the robustness-validate-client-watch branch June 15, 2023 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants