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

The IndexResponseDescriptor is issuing unbounded SQL queries #3490

Closed
michaelnoonan opened this issue May 11, 2017 · 2 comments
Closed

The IndexResponseDescriptor is issuing unbounded SQL queries #3490

michaelnoonan opened this issue May 11, 2017 · 2 comments
Assignees
Labels
feature/performance kind/bug This issue represents a verified problem we are committed to solving
Milestone

Comments

@michaelnoonan
Copy link
Contributor

michaelnoonan commented May 11, 2017

See this line of code: https://github.com/OctopusDeploy/OctopusDeploy/blob/master/source/Octopus.Server/Web/Infrastructure/Api/IndexResponseDescriptor.cs#L48

It seems to have crept in by accident, but it was causing every API request which used the IndexResponseDescriptor to issue a single unbounded query, and then issue the bounded query afterwards. This really becomes obvious on installations with lots of releases etc.

For example: when we call /api/releases we are executing SELECT * FROM dbo.[Release] ORDER BY [Id] and then we issue the paginated query:
2017-05-12 08:00:36.8727 56 INFO Reader took 2672ms (2ms until the first record) in transaction 'http://localhost/api/releases 210f59c8b58a4ebe857d2a198853c37f': SELECT * FROM dbo.[Release] ORDER BY [Id]

It's not common that we use these APIs, but this code is obviously misbehaving.

See original conversation: https://octopusdeploy.slack.com/archives/C4LB9LZNK/p1494541044882046

@michaelnoonan michaelnoonan added kind/bug This issue represents a verified problem we are committed to solving feature/performance labels May 11, 2017
@michaelnoonan michaelnoonan self-assigned this May 11, 2017
@octoreleasebot octoreleasebot added this to the 3.13.4 milestone May 11, 2017
@octoreleasebot
Copy link

Release Note: Fixed a performance problem where both an unbounded and paginated SQL query were issued for some requests

@lock
Copy link

lock bot commented Nov 23, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. If you think you've found a related issue, please contact our support team so we can triage your issue, and make sure it's handled appropriately.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature/performance kind/bug This issue represents a verified problem we are committed to solving
Projects
None yet
Development

No branches or pull requests

2 participants