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

Status Page. Currently, checks the availability of SQL Azure and Storage #2127

Merged
merged 4 commits into from
May 14, 2014

Conversation

deepakaravindr
Copy link
Contributor

Status Page. Currently, checks the availability of SQL Azure and Storage

  1. Checking Storage Availability by checking if nuget.exe exists in storage
  2. Checking SQL Azure Availability by selecting 1 key from Packages Table

…torage

1) Checking Storage Availability by checking if nuget.exe exists in storage
2) Checking SQL Azure Availability by selecting 1 key from Packages Table
private const string Unavailable = "Unavailable";
private const string StatusMessageFormat = "NuGet Gallery service is {0}. SQL Azure is {1}. Storage is {2}";

private const string TestSqlQuery = "SELECT TOP(1) [Key] FROM Packages";
Copy link
Member

Choose a reason for hiding this comment

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

I recommend hitting the GallerySettings table instead of Packages. And use a WITH (NOLOCK) hint too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Based on your comment, I have updated the table to 'Users' WITH (NOLOCK). Since it is TOP(1) with (NO LOCK) on Key, it should be really quick. And, I prefer Users over other tables because, it covers incomplete imports too. Incomplete imports generally have an empty 'Users' Table. I am guessing import loads the tables alphabetically

This means 2 things. If we are not okay with that, I will change it to GallerySettings instead of Users

  1. Primary service's health is still measured correctly with this query. This is good
  2. Failover service's health is better measured with this query. But, 'Primary Ops' will likely receive a phone call even for an incomplete import to Failover as against a Failover that is truly fully down. I would like to think that an incomplete import is just as bad as a unavailable DB

deepakaravindr added a commit that referenced this pull request May 14, 2014
Status Page. Currently, checks the availability of SQL Azure and Storage
@deepakaravindr deepakaravindr merged commit 0c3a8c1 into master May 14, 2014
@deepakaravindr
Copy link
Contributor Author

Fixes #2155

@maartenba maartenba deleted the daravind/GalleryStatusPage branch June 12, 2015 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants