Enable connection pooling for languageService (#2080)

This commit is contained in:
Cheena Malhotra
2023-05-31 17:15:47 -07:00
committed by GitHub
parent 478b10d391
commit b45026967e
4 changed files with 28 additions and 14 deletions

View File

@@ -172,7 +172,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
if (connectionService == null)
{
connectionService = ConnectionService.Instance;
connectionService.RegisterConnectedQueue("LanguageService", bindingQueue);
connectionService.RegisterConnectedQueue(Constants.LanguageServiceFeature, bindingQueue);
}
return connectionService;
}
@@ -720,7 +720,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
{
try
{
this.BindingQueue.AddConnectionContext(connInfo, featureName: "LanguageService", overwrite: true);
this.BindingQueue.AddConnectionContext(connInfo, featureName: Constants.LanguageServiceFeature, overwrite: true);
RemoveScriptParseInfo(rebuildParams.OwnerUri);
UpdateLanguageServiceOnConnection(connInfo).Wait();
}
@@ -1004,7 +1004,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
{
try
{
scriptInfo.ConnectionKey = this.BindingQueue.AddConnectionContext(info, "languageService");
scriptInfo.ConnectionKey = this.BindingQueue.AddConnectionContext(info, Constants.LanguageServiceFeature);
scriptInfo.IsConnected = this.BindingQueue.IsBindingContextConnected(scriptInfo.ConnectionKey);
}
catch (Exception ex)