Skip to content

Allow more than 1000 concurrent revisions when CC!=0#8799

Merged
knative-prow-robot merged 4 commits intoknative:masterfrom
julz:athousandisnotenough
Jul 25, 2020
Merged

Allow more than 1000 concurrent revisions when CC!=0#8799
knative-prow-robot merged 4 commits intoknative:masterfrom
julz:athousandisnotenough

Conversation

@julz
Copy link
Copy Markdown
Contributor

@julz julz commented Jul 24, 2020

We need to set some sort of limit on the revision throttler because the breaker is backed by a chan struct{}, but it can and should be higher than 1000 concurrent requests.

Also added some more comments and renamed breakerParams to revisionBreakerParams since this was super-confusing to me, but this file could probably do with some more cleanup.

/assign @markusthoemmes @vagababov

We unfortunately need to set some sort of limit because breaker is backed
by a chan struct{}, but it can and should be much higher than 1000.

Also added some more comments and renamed breakerParams to
revisionBreakerParams since this was super-confusing to me, but this
file needs more cleanup.
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Jul 24, 2020
@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 24, 2020
Copy link
Copy Markdown
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@julz: 0 warnings.

Details

In response to this:

We need to set some sort of limit on the revision throttler because the breaker is backed by a chan struct{}, but it can and should be higher than 1000 concurrent requests.

Also added some more comments and renamed breakerParams to revisionBreakerParams since this was super-confusing to me, but this file could probably do with some more cleanup.

/assign @markusthoemmes @vagababov

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/test-infra repository.

@knative-prow-robot knative-prow-robot added area/autoscale approved Indicates a PR has been approved by an approver from all required OWNERS files. area/networking labels Jul 24, 2020
Comment thread pkg/activator/net/throttler.go Outdated
// to this value. We need to set some value here since the breaker requires
// an explicit buffer size (it's backed by a chan struct{}), but it can
// safely be quite large.
breakerMaxConcurrency = 100000
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any reason this is not just the max buffer length of channels anyway? Or Int32Max or something?

Maybe we should set a constant in the breaker implementation itself and reuse that here. I.e. queue.MaxBreakerCapacity and describe there why it's set to the respective value.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah, can't think of a reason not to, and the constant in queue is a good idea. Turned out this needed some test fixes since they try to create MaxConcurrency trackers, though.

@knative-prow-robot knative-prow-robot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 24, 2020
Copy link
Copy Markdown
Contributor

@markusthoemmes markusthoemmes left a comment

Choose a reason for hiding this comment

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

/lgtm
/hold

In case @vagababov knows some Go internals that would prevent us from doing this 😅.

@knative-prow-robot knative-prow-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels Jul 24, 2020
@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Jul 24, 2020
Comment thread pkg/activator/net/throttler_test.go Outdated
// as MaxConcurrency. This will be very, very slow if MaxConcurrency is very large.
bmp := revisionBreakerParams.MaxConcurrency
revisionBreakerParams.MaxConcurrency = 1000
defer func() { revisionBreakerParams.MaxConcurrency = bmp }()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

duh, t.Cleanup :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

heh, fine - updated

@vagababov
Copy link
Copy Markdown
Contributor

lgtm in general :)

Copy link
Copy Markdown
Contributor

@vagababov vagababov left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 24, 2020
@vagababov
Copy link
Copy Markdown
Contributor

/approve

@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: julz, vagababov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 24, 2020
@julz
Copy link
Copy Markdown
Contributor Author

julz commented Jul 24, 2020

/unhold

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 24, 2020
@vagababov
Copy link
Copy Markdown
Contributor

/retest

@yanweiguo
Copy link
Copy Markdown
Contributor

/lgtm

@julz
Copy link
Copy Markdown
Contributor Author

julz commented Jul 24, 2020

/retest

@yanweiguo
Copy link
Copy Markdown
Contributor

The failed one looks not relative

/retest

@vagababov
Copy link
Copy Markdown
Contributor

🤷
/retest

@knative-test-reporter-robot
Copy link
Copy Markdown

The following jobs failed:

Test name Triggers Retries
pull-knative-serving-autotls-tests 0/3
pull-knative-serving-integration-tests 2020-07-24 17:03:14.442 +0000 UTC
2020-07-24 18:00:14.323 +0000 UTC
2020-07-24 19:58:14.5 +0000 UTC
2020-07-24 20:53:44.447 +0000 UTC
2020-07-24 21:50:14.419 +0000 UTC
3/3
pull-knative-serving-unit-tests 0/3

Failed non-flaky tests preventing automatic retry of pull-knative-serving-unit-tests:

pkg/autoscaler/metrics.TestMetricCollectorScraper

@julz
Copy link
Copy Markdown
Contributor Author

julz commented Jul 25, 2020

:(

/retest

@knative-prow-robot knative-prow-robot merged commit a342c9f into knative:master Jul 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/autoscale area/networking cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants