Forum Discussion
Mystical PolyBase error
I have a recurring issue and need help to figure out the underlying cause.
We use PolyBase to connect to a Blob Container using External Tables. The first query on an external table after a boot/start of the server fails with the below three records in DWDiagnostics.dbo.pdw_errors. However, the second attempt almost always works! I would very much appreciate any help to uncover what could explain this weird behavior.
--FIRST
FullName: DSQLInstrumentation:OptimizationErrorEvent
Message:
Microsoft.SqlServer.DataWarehouse.Common.ErrorHandling.ActionCancelledException: Exception of type 'Microsoft.SqlServer.DataWarehouse.Common.ErrorHandling.ActionCancelledException' was thrown.
at Microsoft.SqlServer.DataWarehouse.Utilities.Cancel.AbstractCancelableRootObject.TerminateIfCanceled()
at Microsoft.SqlServer.DataWarehouse.Sql.Optimizer.Task.Execute()
at Microsoft.SqlServer.DataWarehouse.Sql.Optimizer.MemoDataStructures.Memo.Optimize(ICompilationContext compilationContext, Statement statement)
at Microsoft.SqlServer.DataWarehouse.Sql.Statements.OptimizedStatement.OptimizeAndGenerateDistributedPlan(DsqlQueryPlan resultPlan, ICompilationContext context, String label, String uniquePlanIdentifier)
at Microsoft.SqlServer.DataWarehouse.Sql.Statements.OptimizedStatement.GenerateDistributedPlan(DsqlQueryPlan resultPlan, ICompilationContext context)
at Microsoft.SqlServer.DataWarehouse.Sql.Statements.Statement.TryGetPlan(PlanType planType, ICompilationContext context, DsqlQueryPlan& plan)
at Microsoft.SqlServer.DataWarehouse.Engine.Processors.DistributedQueryProcessor.BuildDistributedPlan()
at Microsoft.SqlServer.DataWarehouse.Engine.Utils.EventUtils.PublishApplicationEventAndExecute(ApplicationEventTrigger beginTrigger, ApplicationEventTrigger endTrigger, ApplicationEventTrigger errorTrigger, ApplicationEventTrigger cancelTrigger, PublishedEventPayloadDelegate payload, Action callback)
at Microsoft.SqlServer.DataWarehouse.Engine.Processors.ExecuteMemoProcessor.BuildPlans()
at Microsoft.SqlServer.DataWarehouse.Engine.Processors.ExecuteMemoProcessor.OnExecuteRequest()
at Microsoft.SqlServer.DataWarehouse.Engine.Utils.EventUtils.PublishApplicationEventAndExecute(ApplicationEventTrigger beginTrigger, ApplicationEventTrigger endTrigger, ApplicationEventTrigger errorTrigger, ApplicationEventTrigger cancelTrigger, PublishedEventPayloadDelegate payload, Action callback)
at Microsoft.SqlServer.DataWarehouse.Engine.Processors.AbstractProcessor.OnProcess()
at Microsoft.SqlServer.DataWarehouse.Engine.Processors.AbstractProcessor.OnExecute()
--SECOND
FullName: EngineInstrumentation:EngineQueryErrorEvent
Message:
Microsoft.SqlServer.DataWarehouse.Common.ErrorHandling.ActionCancelledException: Exception of type 'Microsoft.SqlServer.DataWarehouse.Common.ErrorHandling.ActionCancelledException' was thrown.
at Microsoft.SqlServer.DataWarehouse.Utilities.Cancel.AbstractCancelableRootObject.TerminateIfCanceled()
at Microsoft.SqlServer.DataWarehouse.Sql.Optimizer.Task.Execute()
at Microsoft.SqlServer.DataWarehouse.Sql.Optimizer.MemoDataStructures.Memo.Optimize(ICompilationContext compilationContext, Statement statement)
at Microsoft.SqlServer.DataWarehouse.Sql.Statements.OptimizedStatement.OptimizeAndGenerateDistributedPlan(DsqlQueryPlan resultPlan, ICompilationContext context, String label, String uniquePlanIdentifier)
at Microsoft.SqlServer.DataWarehouse.Sql.Statements.OptimizedStatement.GenerateDistributedPlan(DsqlQueryPlan resultPlan, ICompilationContext context)
at Microsoft.SqlServer.DataWarehouse.Sql.Statements.Statement.TryGetPlan(PlanType planType, ICompilationContext context, DsqlQueryPlan& plan)
at Microsoft.SqlServer.DataWarehouse.Engine.Processors.DistributedQueryProcessor.BuildDistributedPlan()
at Microsoft.SqlServer.DataWarehouse.Engine.Utils.EventUtils.PublishApplicationEventAndExecute(ApplicationEventTrigger beginTrigger, ApplicationEventTrigger endTrigger, ApplicationEventTrigger errorTrigger, ApplicationEventTrigger cancelTrigger, PublishedEventPayloadDelegate payload, Action callback)
at Microsoft.SqlServer.DataWarehouse.Engine.Processors.ExecuteMemoProcessor.BuildPlans()
at Microsoft.SqlServer.DataWarehouse.Engine.Processors.ExecuteMemoProcessor.OnExecuteRequest()
at Microsoft.SqlServer.DataWarehouse.Engine.Utils.EventUtils.PublishApplicationEventAndExecute(ApplicationEventTrigger beginTrigger, ApplicationEventTrigger endTrigger, ApplicationEventTrigger errorTrigger, ApplicationEventTrigger cancelTrigger, PublishedEventPayloadDelegate payload, Action callback)
at Microsoft.SqlServer.DataWarehouse.Engine.Processors.AbstractProcessor.OnProcess()
at Microsoft.SqlServer.DataWarehouse.Engine.Processors.AbstractProcessor.OnExecute()
--THIRD
FullName: EngineInstrumentation:EngineExecuteQueryErrorEvent
Message:
Microsoft.SqlServer.DataWarehouse.Common.ErrorHandling.ActionCancelledException: Query Cancelled. ---> Microsoft.SqlServer.DataWarehouse.Common.ErrorHandling.ActionCancelledException: Exception of type 'Microsoft.SqlServer.DataWarehouse.Common.ErrorHandling.ActionCancelledException' was thrown.
at Microsoft.SqlServer.DataWarehouse.Utilities.Cancel.AbstractCancelableRootObject.TerminateIfCanceled()
at Microsoft.SqlServer.DataWarehouse.Sql.Optimizer.Task.Execute()
at Microsoft.SqlServer.DataWarehouse.Sql.Optimizer.MemoDataStructures.Memo.Optimize(ICompilationContext compilationContext, Statement statement)
at Microsoft.SqlServer.DataWarehouse.Sql.Statements.OptimizedStatement.OptimizeAndGenerateDistributedPlan(DsqlQueryPlan resultPlan, ICompilationContext context, String label, String uniquePlanIdentifier)
at Microsoft.SqlServer.DataWarehouse.Sql.Statements.OptimizedStatement.GenerateDistributedPlan(DsqlQueryPlan resultPlan, ICompilationContext context)
at Microsoft.SqlServer.DataWarehouse.Sql.Statements.Statement.TryGetPlan(PlanType planType, ICompilationContext context, DsqlQueryPlan& plan)
at Microsoft.SqlServer.DataWarehouse.Engine.Processors.DistributedQueryProcessor.BuildDistributedPlan()
at Microsoft.SqlServer.DataWarehouse.Engine.Utils.EventUtils.PublishApplicationEventAndExecute(ApplicationEventTrigger beginTrigger, ApplicationEventTrigger endTrigger, ApplicationEventTrigger errorTrigger, ApplicationEventTrigger cancelTrigger, PublishedEventPayloadDelegate payload, Action callback)
at Microsoft.SqlServer.DataWarehouse.Engine.Processors.ExecuteMemoProcessor.BuildPlans()
at Microsoft.SqlServer.DataWarehouse.Engine.Processors.ExecuteMemoProcessor.OnExecuteRequest()
at Microsoft.SqlServer.DataWarehouse.Engine.Utils.EventUtils.PublishApplicationEventAndExecute(ApplicationEventTrigger beginTrigger, ApplicationEventTrigger endTrigger, ApplicationEventTrigger errorTrigger, ApplicationEventTrigger cancelTrigger, PublishedEventPayloadDelegate payload, Action callback)
at Microsoft.SqlServer.DataWarehouse.Engine.Processors.AbstractProcessor.OnProcess()
at Microsoft.SqlServer.DataWarehouse.Engine.Processors.AbstractProcessor.OnExecute()
at Microsoft.SqlServer.DataWarehouse.Engine.Utils.EventUtils.PublishApplicationEventAndExecute(ApplicationEventTrigger beginTrigger, ApplicationEventTrigger endTrigger, ApplicationEventTrigger errorTrigger, ApplicationEventTrigger cancelTrigger, PublishedEventPayloadDelegate payload, Action callback)
at Microsoft.SqlServer.DataWarehouse.Engine.Processors.AbstractProcessor.Execute()
at Microsoft.SqlServer.DataWarehouse.Engine.Server.ServerInterface.ProcessorWorker.ExecuteProcessor()
--- End of inner exception stack trace ---
at Microsoft.SqlServer.DataWarehouse.Engine.Server.ServerInterface.Execute(IQueryContext queryCtx, Boolean isSubBatch, Boolean isBatchInProgress)
at Microsoft.SqlServer.DataWarehouse.Engine.Server.ServerInterface.OnExecuteRequest(IClientInterface client, String query, Boolean isInBatch, StatementExecutionContext executionContext, IDictionary`2 replacementInfos, String database, Statement pregeneratedStatement, SqlFrontEndRequest request)