3702 Changed CancelQuery to use ExecuteControlCommand instead of ExecuteQuery in KustoDataSource. Fixed runtime error in NodePathGenerator for loading TreeNodeDefinition.xml (#1069)

This commit is contained in:
Justin M
2020-09-08 14:05:45 -07:00
committed by GitHub
parent cd1e4f5ec5
commit f0ec7e14d4
2 changed files with 4 additions and 10 deletions

View File

@@ -239,14 +239,8 @@ namespace Microsoft.Kusto.ServiceLayer.DataSource
private void CancelQuery(string clientRequestId) private void CancelQuery(string clientRequestId)
{ {
var query = ".cancel query " + clientRequestId; var query = $".cancel query \"{clientRequestId}\"";
CancellationTokenSource source = new CancellationTokenSource(); ExecuteControlCommand(query);
CancellationToken token = source.Token;
using (var reader = ExecuteQuery(query, token))
{
// No-op
}
} }
/// <inheritdoc/> /// <inheritdoc/>

View File

@@ -24,7 +24,7 @@ namespace Microsoft.Kusto.ServiceLayer.ObjectExplorer.DataSourceModel
} }
var assembly = typeof(ObjectExplorerService).Assembly; var assembly = typeof(ObjectExplorerService).Assembly;
var resource = assembly.GetManifestResourceStream("Microsoft.Kusto.ServiceLayer.ObjectExplorer.SmoModel.TreeNodeDefinition.xml"); var resource = assembly.GetManifestResourceStream("Microsoft.Kusto.ServiceLayer.ObjectExplorer.DataSourceModel.TreeNodeDefinition.xml");
var serializer = new XmlSerializer(typeof(ServerExplorerTree)); var serializer = new XmlSerializer(typeof(ServerExplorerTree));
NodeTypeDictionary = new Dictionary<string, HashSet<Node>>(); NodeTypeDictionary = new Dictionary<string, HashSet<Node>>();
using (var reader = new StreamReader(resource)) using (var reader = new StreamReader(resource))