Fix DW connection bug (#258)

- Connection info cache is now per-DB instead of per-server. This has the downside of increasing #queries, but is required in order to correctly handle isSqlDW since this changes for each database on an Azure server.
This commit is contained in:
Kevin Cunnane
2017-02-27 23:13:36 -08:00
committed by GitHub
parent b38c1f2a42
commit dd9f2d55d4
5 changed files with 242 additions and 70 deletions

View File

@@ -407,7 +407,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
public static void SetCommandTimeout(IDbCommand cmd)
{
Validate.IsNotNull(nameof(cmd), cmd);
cmd.CommandTimeout = CachedServerInfo.GetQueryTimeoutSeconds(cmd.Connection);
cmd.CommandTimeout = CachedServerInfo.Instance.GetQueryTimeoutSeconds(cmd.Connection);
}
@@ -773,7 +773,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
try
{
CachedServerInfo.AddOrUpdateIsAzure(connection, serverInfo.IsCloud);
CachedServerInfo.Instance.AddOrUpdateIsAzure(connection, serverInfo.IsCloud);
}
catch (Exception ex)
{